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

SCM Repository

[diderot] Diff of /trunk/src/compiler/typechecker/typechecker.sml
ViewVC logotype

Diff of /trunk/src/compiler/typechecker/typechecker.sml

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

revision 474, Thu Nov 4 18:33:56 2010 UTC revision 475, Thu Nov 4 18:57:11 2010 UTC
# Line 274  Line 274 
274                  val (args, ty::tys) = checkExprList (env, cxt, args)                  val (args, ty::tys) = checkExprList (env, cxt, args)
275                  in                  in
276                    case TU.pruneHead ty                    case TU.pruneHead ty
277                     of Ty.T_Tensor shape => let                     of ty as Ty.T_Tensor shape => let
278                            val Ty.Shape dd = TU.pruneShape shape (* NOTE: this may fail if we allow user polymorphism *)
279                          fun chkTy ty' = U.matchType(ty, ty')                          fun chkTy ty' = U.matchType(ty, ty')
280                          val resTy = Ty.T_Tensor(Ty.shapeExt(shape, Ty.DimConst(List.length args)))                          val resTy = Ty.T_Tensor(Ty.Shape(Ty.DimConst(List.length args) :: dd))
281                          in                          in
282                            if List.all chkTy tys                            if List.all chkTy tys
283                              then (AST.E_Cons args, resTy)                              then (AST.E_Cons args, resTy)

Legend:
Removed from v.474  
changed lines
  Added in v.475

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