diff options
| author | Kathy Gray | 2014-01-17 19:53:33 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-01-17 19:53:46 +0000 |
| commit | 9ee67ed106808b5e82d5942e4d782fbf8cd133cd (patch) | |
| tree | 60e32496edc0d49ba99d68739db52c375cdad16c /src/initial_check.ml | |
| parent | 828f19828e41ced146f06e9a7eb4183cd9ef3ab4 (diff) | |
Type check through type definitions and val specifications, building definition environment. Skipping function definition, let bind, and expression checking for this commit (to come).
Diffstat (limited to 'src/initial_check.ml')
| -rw-r--r-- | src/initial_check.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/initial_check.ml b/src/initial_check.ml index b84cfdcc..7a4cc413 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -4,7 +4,7 @@ open Ast type kind = Type_internal.kind type typ = Type_internal.t -type envs = Nameset.t * kind Envmap.t * t Envmap.t +type envs = Nameset.t * kind Envmap.t * tannot Envmap.t type 'a envs_out = 'a * envs let id_to_string (Id_aux(id,l)) = @@ -666,12 +666,12 @@ let rec to_ast_defs_helper envs partial_defs = function then (fst !d) :: defs, envs, partial_defs else typ_error l "Scattered type definition never ended" (Some id) None None)) -let to_ast (default_names : Nameset.t) (kind_env : kind Envmap.t) (typ_env : t Envmap.t) (Parse_ast.Defs(defs)) = - let defs,_,partial_defs = to_ast_defs_helper (default_names,kind_env,typ_env) [] defs in +let to_ast (default_names : Nameset.t) (kind_env : kind Envmap.t) (typ_env : tannot Envmap.t) (Parse_ast.Defs(defs)) = + let defs,(_,k_env,_),partial_defs = to_ast_defs_helper (default_names,kind_env,typ_env) [] defs in List.iter (fun (id,(d,k)) -> (match !d with | (DEF_aux(_,(l,_)),false) -> typ_error l "Scattered definition never ended" (Some id) None None | (_, true) -> ())) partial_defs; - (Defs defs) + (Defs defs),k_env |
