Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/ast/type-util.sml
ViewVC logotype

Diff of /trunk/src/ast/type-util.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 75, Mon May 24 20:41:18 2010 UTC revision 95, Thu May 27 17:22:20 2010 UTC
# Line 6  Line 6 
6    
7  structure TypeUtil : sig  structure TypeUtil : sig
8    
9      (* string representations of types, etc *)
10      val toString : Types.ty -> string      val toString : Types.ty -> string
11        val diffToString : Types.diff -> string
12        val shapeToString : Types.shape -> string
13        val dimToString : Types.dim -> string
14    
15    end = struct    end = struct
16    
# Line 53  Line 57 
57                    "field#", diffToString diff, "(", dimToString dim,                    "field#", diffToString diff, "(", dimToString dim,
58                    ")", shapeToString shape                    ")", shapeToString shape
59                  ]                  ]
60              | Ty.T_Fun(tys1, tys2) => let              | Ty.T_Fun(tys1, ty2) => let
61                  fun tysToString [] = "()"                  fun tysToString [] = "()"
62                    | tysToString [ty] = toString ty                    | tysToString [ty] = toString ty
63                    | tysToString tys = String.concat[                    | tysToString tys = String.concat[
64                          "(", listToString toString " * " tys, ")"                          "(", listToString toString " * " tys, ")"
65                        ]                        ]
66                  in                  in
67                    String.concat[tysToString tys1, " -> ", tysToString tys2]                    String.concat[tysToString tys1, " -> ", toString ty2]
68                  end                  end
69            (* end case *))            (* end case *))
70    

Legend:
Removed from v.75  
changed lines
  Added in v.95

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0