From 7c0435413b58eb82a22602d4a3b65f45323dc03b Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Tue, 29 Jul 2014 15:35:21 +0100 Subject: 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. --- src/initial_check.mli | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/initial_check.mli') 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 -- cgit v1.2.3