summaryrefslogtreecommitdiff
path: root/src/initial_check.mli
diff options
context:
space:
mode:
authorKathy Gray2014-07-29 15:35:21 +0100
committerKathy Gray2014-07-29 15:35:21 +0100
commit7c0435413b58eb82a22602d4a3b65f45323dc03b (patch)
tree0566b87355a5bdfae070b607fee13af66ebf5c03 /src/initial_check.mli
parent86f74211ca777ceaed0a58196efc05a2bb185642 (diff)
A file can now declare that a default order is either inc or dec, and this will be reflected in short hand type syntax, inc is still the default if undeclared
So: default order dec register bit[32] t (* Declares t as a decreasing vector, starting at 31 on the left and decreasing to 0 *) default order inc register bit[32] o (* Declares o as an increasing vector, starting at 0 on the left and increasing to 31 *) It is presently possible to change the default mid-file; this is almost certainly bad and I will turn it into an error soon.
Diffstat (limited to 'src/initial_check.mli')
-rw-r--r--src/initial_check.mli7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/initial_check.mli b/src/initial_check.mli
index feed37b8..14108e08 100644
--- a/src/initial_check.mli
+++ b/src/initial_check.mli
@@ -4,8 +4,9 @@ open Type_internal
type kind = Type_internal.kind
type typ = Type_internal.t
-type envs = Nameset.t * kind Envmap.t * tannot Envmap.t
+(*Envs is a tuple of used names (currently unused), map from id to kind, default order for vector types and literal vectors *)
+type envs = Nameset.t * kind Envmap.t * Ast.order
type 'a envs_out = 'a * envs
-val to_ast : Nameset.t -> kind Envmap.t -> tannot Envmap.t -> Parse_ast.defs -> tannot defs * kind Envmap.t
-val to_ast_exp : kind Envmap.t -> Parse_ast.exp -> Type_internal.tannot Ast.exp
+val to_ast : Nameset.t -> kind Envmap.t -> Ast.order -> Parse_ast.defs -> tannot defs * kind Envmap.t * Ast.order
+val to_ast_exp : kind Envmap.t -> Ast.order -> Parse_ast.exp -> Type_internal.tannot Ast.exp