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 3427, Fri Nov 13 17:07:04 2015 UTC revision 3428, Fri Nov 13 17:47:12 2015 UTC
# Line 484  Line 484 
484                              (* end case *))                              (* end case *))
485                          | NONE => err(cxt, [S "unknown strand ", A strand])                          | NONE => err(cxt, [S "unknown strand ", A strand])
486                        (* end case *))                        (* end case *))
487                      | (e', Ty.T_Error) => bogusExpTy
488                    | (_, ty) => err (cxt, [                    | (_, ty) => err (cxt, [
489                          S "expected strand type, but found ", TY ty,                          S "expected strand type, but found ", TY ty,
490                          S " in selection of ", A field                          S " in selection of ", A field
# Line 492  Line 493 
493              | PT.E_Real e => (case check (env, cxt, e)              | PT.E_Real e => (case check (env, cxt, e)
494                   of (e', Ty.T_Int) =>                   of (e', Ty.T_Int) =>
495                        (AST.E_Prim(BV.i2r, [], [e'], Ty.realTy), Ty.realTy)                        (AST.E_Prim(BV.i2r, [], [e'], Ty.realTy), Ty.realTy)
496                      | (e', Ty.T_Error) => bogusExpTy
497                    | (_, ty) => err(cxt, [                    | (_, ty) => err(cxt, [
498                          S "argument of 'real' must have type 'int', but found ",                          S "argument of 'real' must have type 'int', but found ",
499                          TY ty                          TY ty
# Line 580  Line 582 
582                          | NONE => err(cxt, [S "arguments of sequence expression must have same type"])                          | NONE => err(cxt, [S "arguments of sequence expression must have same type"])
583                        (* end case *))                        (* end case *))
584                  (* end case *))                  (* end case *))
585              | PT.E_SeqComp comp => raise Fail "FIXME"              | PT.E_SeqComp comp => chkComprehension (env, cxt, comp)
586              | PT.E_Cons args => let              | PT.E_Cons args => let
587                (* Note that we are guaranteed that args is non-empty *)                (* Note that we are guaranteed that args is non-empty *)
588                  val (args, tys) = checkList (env, cxt, args)                  val (args, tys) = checkList (env, cxt, args)
# Line 660  Line 662 
662                    ((x', bogusExp), E.insertLocal(env, cxt, x, x'))                    ((x', bogusExp), E.insertLocal(env, cxt, x, x'))
663                  end                  end
664            (* end case *))            (* end case *))
       | checkIter (env, cxt, PT.I_Deprecate(msg, iter)) = (  
           warn (cxt, [S msg]);  
           checkIter (env, cxt, iter))  
665    
666    (* typecheck a list of expressions returning a list of AST expressions and a list    (* typecheck a list of expressions returning a list of AST expressions and a list
667     * of the types of the expressions.     * of the types of the expressions.

Legend:
Removed from v.3427  
changed lines
  Added in v.3428

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