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 170, Sat Jul 24 13:30:47 2010 UTC revision 171, Sat Jul 24 14:13:10 2010 UTC
# Line 126  Line 126 
126      fun checkExpr (env : env, cxt, e) = (case e      fun checkExpr (env : env, cxt, e) = (case e
127             of PT.E_Mark m => checkExpr (withEnvAndContext (env, cxt, m))             of PT.E_Mark m => checkExpr (withEnvAndContext (env, cxt, m))
128              | PT.E_Var x => (case Env.findVar (#env env, x)              | PT.E_Var x => (case Env.findVar (#env env, x)
129                   of SOME x' => (case Var.typeOf x'                   of SOME x' => (AST.E_Var x', Var.monoTypeOf x')
                        of ([], ty) => (AST.E_Var x', ty)  
                         | _ => raise Fail "Unexpected polymorphic variable"  
                       (* end case *))  
130                    | NONE => err(cxt, [S "undeclared variable ", A x])                    | NONE => err(cxt, [S "undeclared variable ", A x])
131                  (* end case *))                  (* end case *))
132              | PT.E_Lit lit => checkLit lit              | PT.E_Lit lit => checkLit lit

Legend:
Removed from v.170  
changed lines
  Added in v.171

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