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 75, Mon May 24 20:41:18 2010 UTC revision 80, Tue May 25 03:05:33 2010 UTC
# Line 70  Line 70 
70             of PT.E_Mark m => checkExpr (env, #span m, #tree m)             of PT.E_Mark m => checkExpr (env, #span m, #tree m)
71              | PT.E_Var x => (case Env.findVar (env, x)              | PT.E_Var x => (case Env.findVar (env, x)
72                   of SOME x' => (case Var.typeOf x'                   of SOME x' => (case Var.typeOf x'
73                         of ([], ty) => (E_Var x', ty)                         of ([], ty) => (AST.E_Var x', ty)
74                          | (tvs, ty) => raise Fail "unimplemented"                          | scheme => let
75                                val (args, ty) = Util.instantiate scheme
76                                in
77                                  (AST.E_VarInst(x', args, ty), ty)
78                                end
79                        (* end case *))                        (* end case *))
80                    | NONE => raise Fail "undefined variable"                    | NONE => raise Fail "undefined variable"
81                  (* end case *))                  (* end case *))
# Line 81  Line 85 
85              | PT.E_Tuple of expr list              | PT.E_Tuple of expr list
86              | PT.E_Apply of var * expr list              | PT.E_Apply of var * expr list
87              | PT.E_Cons of ty * expr list              | PT.E_Cons of ty * expr list
             | PT.E_Diff of expr  
             | PT.E_Norm of expr  
88            (* end case *))            (* end case *))
89    
90      fun checkVarDecl (env, cxt, kind, d) = (case d      fun checkVarDecl (env, cxt, kind, d) = (case d

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

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