home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP type-checking -- check recursive type defs
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_env_type.ml
diff --git
a/compiler/src/lib/tiger/tiger_env_type.ml
b/compiler/src/lib/tiger/tiger_env_type.ml
index
4d99a0d
..
a2e719f
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_env_type.ml
+++ b/
compiler/src/lib/tiger/tiger_env_type.ml
@@
-45,7
+45,10
@@
let new_array ty =
let is_equal t1 t2 =
match t1, t2 with
let is_equal t1 t2 =
match t1, t2 with
+ | Name (s1, _) , Name (s2, _) -> Symbol.is_equal s1 s2
| Record {unique=u1; _}, Record {unique=u2; _} -> u1 == u2
| Record {unique=u1; _}, Record {unique=u2; _} -> u1 == u2
+ | Record _ , Nil -> true
+ | Nil , Record _ -> true
| Array {unique=u1; _}, Array {unique=u2; _} -> u1 == u2
| t1 , t2 -> t1 = t2
(* The above pattern matching is "fragile" and I'm OK with it.
| Array {unique=u1; _}, Array {unique=u2; _} -> u1 == u2
| t1 , t2 -> t1 = t2
(* The above pattern matching is "fragile" and I'm OK with it.
This page took
0.024559 seconds
and
4
git commands to generate.