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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/simplify/simple.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/simplify/simple.sml

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

revision 2141, Fri Feb 15 13:13:46 2013 UTC revision 2255, Tue Mar 5 19:43:36 2013 UTC
# Line 102  Line 102 
102            val d = List.length xs + 1            val d = List.length xs + 1
103            val ty = Var.monoTypeOf x            val ty = Var.monoTypeOf x
104            in            in
105              case ty              case TypeUtil.pruneHead ty
106               of Types.T_Tensor shape => Types.T_Tensor(Types.shapeExt(shape, Types.DimConst d))               of Types.T_Tensor shape => Types.T_Tensor(Types.shapeExt(shape, Types.DimConst d))
107                | _ => raise Fail "element of tensor construction not tensor"                | _ => raise Fail(concat[
108                        "element of tensor construction is ", TypeUtil.toString ty, ", expected tensor"
109                      ])
110              (* end case *)              (* end case *)
111            end            end
112        | typeOf (E_Seq[]) = raise Fail "empty sequence not supported yet"        | typeOf (E_Seq[]) = raise Fail "empty sequence not supported yet"
113        | typeOf (E_Seq(x::xs)) = let        | typeOf (E_Seq(x::xs)) = let
114            val d = List.length xs + 1            val d = List.length xs + 1
115            val ty = Var.monoTypeOf x            val ty = TypeUtil.pruneHead(Var.monoTypeOf x)
116            in            in
117              Types.T_Sequence(ty, Types.DimConst d)              Types.T_Sequence(ty, Types.DimConst d)
118            end            end

Legend:
Removed from v.2141  
changed lines
  Added in v.2255

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