home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expand status notes
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_env_type.mli
diff --git
a/compiler/src/lib/tiger/tiger_env_type.mli
b/compiler/src/lib/tiger/tiger_env_type.mli
index
825750c
..
2716e59
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_env_type.mli
+++ b/
compiler/src/lib/tiger/tiger_env_type.mli
@@
-7,13
+7,15
@@
type t =
| String
| Record of
{ unique : unique
| String
| Record of
{ unique : unique
- ; fields :
(Tiger_symbol.t * t) list
+ ; fields :
record_fields
}
| Array of
{ unique : unique
; ty : t
}
| Name of Tiger_symbol.t * t option ref
}
| Array of
{ unique : unique
; ty : t
}
| Name of Tiger_symbol.t * t option ref
+and record_fields =
+ (Tiger_symbol.t * t) list
type env =
(Tiger_symbol.t, t ) Tiger_map.t
type env =
(Tiger_symbol.t, t ) Tiger_map.t
@@
-21,11
+23,17
@@
type env =
val built_in : env
val is_equal : t -> t -> bool
val built_in : env
val is_equal : t -> t -> bool
-val is_record : t -> bool
+
val is_int : t -> bool
val is_int : t -> bool
+val is_string : t -> bool
+val is_array : t -> bool
+val is_record : t -> bool
val is_name : t -> bool
val is_name : t -> bool
-val new_record : (Tiger_symbol.t * t) list -> t
+val if_record : t -> f:(record_fields -> 'a) -> otherwise:(unit -> 'a) -> 'a
+val if_array : t -> f:(t -> 'a) -> otherwise:(unit -> 'a) -> 'a
+
+val new_record : record_fields -> t
val new_array : t -> t
val to_string : t -> string
val new_array : t -> t
val to_string : t -> string
This page took
0.031493 seconds
and
4
git commands to generate.