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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/typechecker/check-expr.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/typechecker/check-expr.sml

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

revision 3454, Mon Nov 23 13:37:18 2015 UTC revision 3455, Mon Nov 23 13:54:15 2015 UTC
# Line 714  Line 714 
714      and chkStringConstExpr (env, cxt, PT.E_Mark m) =      and chkStringConstExpr (env, cxt, PT.E_Mark m) =
715            chkStringConstExpr (E.withEnvAndContext (env, cxt, m))            chkStringConstExpr (E.withEnvAndContext (env, cxt, m))
716        | chkStringConstExpr (env, cxt, e) = (case checkAndPrune (env, cxt, e)        | chkStringConstExpr (env, cxt, e) = (case checkAndPrune (env, cxt, e)
717             of (e', Ty.T_String) => (case ConstExpr.eval (cxt, false, e')             of (e', Ty.T_String) => (case CheckConst.eval (cxt, false, e')
718                   of SOME(ConstExpr.String s) => SOME s                   of SOME(ConstExpr.String s) => SOME s
719                    | SOME(ConstExpr.Expr e) => raise Fail "FIXME"                    | SOME(ConstExpr.Expr e) => raise Fail "FIXME"
720                    | NONE => NONE                    | NONE => NONE
# Line 731  Line 731 
731    
732    (* check a dimension that is given by a constant expression *)    (* check a dimension that is given by a constant expression *)
733      and checkDim (env, cxt, dim) = (case checkAndPrune (env, cxt, dim)      and checkDim (env, cxt, dim) = (case checkAndPrune (env, cxt, dim)
734             of (e', Ty.T_Int) => (case ConstExpr.eval (cxt, false, e')             of (e', Ty.T_Int) => (case CheckConst.eval (cxt, false, e')
735                   of SOME(ConstExpr.Int d) => SOME d                   of SOME(ConstExpr.Int d) => SOME d
736                    | SOME(ConstExpr.Expr e) => (                    | SOME(ConstExpr.Expr e) => (
737                        TypeError.error (cxt, [S "unable to evaluate constant dimension expression"]);                        TypeError.error (cxt, [S "unable to evaluate constant dimension expression"]);

Legend:
Removed from v.3454  
changed lines
  Added in v.3455

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