diff options
| author | Kathy Gray | 2014-02-21 23:09:09 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-02-21 23:09:09 +0000 |
| commit | 80628627e3d1bfc3cfca0d1c676f256e5fcba10b (patch) | |
| tree | d1340eaca97771b3f1cd0e2b60db5ef1e9ea5514 /src/initial_check.ml | |
| parent | 53146de4b82f90d1b06e9a09c5ec7c5b458fda53 (diff) | |
Add type annotations to lem grammar, including printing out the annotated ast, and extending the interpreter to expect annotations.
Annotations and locations are still not used by the interpreter.
Diffstat (limited to 'src/initial_check.ml')
| -rw-r--r-- | src/initial_check.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/initial_check.ml b/src/initial_check.ml index e7b92019..ed4a0208 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -530,17 +530,17 @@ let to_ast_rec (Parse_ast.Rec_aux(r,l): Parse_ast.rec_opt) : rec_opt = | Parse_ast.Rec_rec -> Rec_rec ),l) -let to_ast_tannot_opt (k_env : kind Envmap.t) (Parse_ast.Typ_annot_opt_aux(tp,l)) : tannot tannot_opt * kind Envmap.t * kind Envmap.t= +let to_ast_tannot_opt (k_env : kind Envmap.t) (Parse_ast.Typ_annot_opt_aux(tp,l)) : tannot_opt * kind Envmap.t * kind Envmap.t= match tp with | Parse_ast.Typ_annot_opt_none -> raise (Reporting_basic.err_unreachable l "Parser generated typ annot opt none") | Parse_ast.Typ_annot_opt_some(tq,typ) -> let typq,k_env,k_local = to_ast_typquant k_env tq in - Typ_annot_opt_aux(Typ_annot_opt_some(typq,to_ast_typ k_env typ),(l,None)),k_env,k_local + Typ_annot_opt_aux(Typ_annot_opt_some(typq,to_ast_typ k_env typ),l),k_env,k_local -let to_ast_effects_opt (k_env : kind Envmap.t) (Parse_ast.Effect_opt_aux(e,l)) : tannot effect_opt = +let to_ast_effects_opt (k_env : kind Envmap.t) (Parse_ast.Effect_opt_aux(e,l)) : effect_opt = match e with - | Parse_ast.Effect_opt_pure -> Effect_opt_aux(Effect_opt_pure,(l,None)) - | Parse_ast.Effect_opt_effect(typ) -> Effect_opt_aux(Effect_opt_effect(to_ast_effects k_env typ),(l,None)) + | Parse_ast.Effect_opt_pure -> Effect_opt_aux(Effect_opt_pure,l) + | Parse_ast.Effect_opt_effect(typ) -> Effect_opt_aux(Effect_opt_effect(to_ast_effects k_env typ),l) let to_ast_funcl (names,k_env,t_env) (Parse_ast.FCL_aux(fcl,l) : Parse_ast.funcl) : (tannot funcl) = match fcl with |
