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

SCM Repository

[diderot] Diff of /trunk/src/compiler/ast/meta-var.sml
ViewVC logotype

Diff of /trunk/src/compiler/ast/meta-var.sml

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

revision 179, Tue Jul 27 20:43:23 2010 UTC revision 182, Wed Jul 28 16:05:13 2010 UTC
# Line 85  Line 85 
85        | copy (SHAPE _) = SHAPE(newShapeVar())        | copy (SHAPE _) = SHAPE(newShapeVar())
86        | copy (DIM _) = DIM(newDimVar())        | copy (DIM _) = DIM(newDimVar())
87    
88        fun toType (TYPE(TV{bind, ...})) = (case !bind
89               of SOME ty => ty
90                | NONE => raise Fail "unbound type meta variable"
91              (* end case *))
92          | toType mv = raise Fail(concat["toType(", metaToString mv, ")"])
93    
94        fun toDiff (DIFF(DfV{bind, ...})) = (case !bind
95               of SOME ty => ty
96                | NONE => raise Fail "unbound diff meta variable"
97              (* end case *))
98          | toDiff mv = raise Fail(concat["toDiff(", metaToString mv, ")"])
99    
100        fun toShape (SHAPE(SV{bind, ...})) = (case !bind
101               of SOME ty => ty
102                | NONE => raise Fail "unbound shape meta variable"
103              (* end case *))
104          | toShape mv = raise Fail(concat["toShape(", metaToString mv, ")"])
105    
106        fun toDim (DIM(DV{bind, ...})) = (case !bind
107               of SOME ty => ty
108                | NONE => raise Fail "unbound dimension meta variable"
109              (* end case *))
110          | toDim mv = raise Fail(concat["toDim(", metaToString mv, ")"])
111    
112    
113      structure Map = RedBlackMapFn (      structure Map = RedBlackMapFn (
114        struct        struct
115          type ord_key = Types.meta_var          type ord_key = Types.meta_var

Legend:
Removed from v.179  
changed lines
  Added in v.182

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