diff options
| author | Alasdair Armstrong | 2018-04-25 20:19:14 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-04-25 20:23:35 +0100 |
| commit | 2217a2537cc504d298da763af613f56965782274 (patch) | |
| tree | d651f5241e81b684fd366ec14bc57f153b10cb90 /src/constraint.ml | |
| parent | 7511b5f693d350fa0d675f0c527d0d633a0ba560 (diff) | |
Simplify subtyping check
This should make subtyping work better for tuples containing
constrained types. Removes the intermediate type-normal-form
representation from the subtyping check, and replaces it with
Env.canonicalize from the canonical branch.
Diffstat (limited to 'src/constraint.ml')
| -rw-r--r-- | src/constraint.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/constraint.ml b/src/constraint.ml index 1b9447f8..d66705b6 100644 --- a/src/constraint.ml +++ b/src/constraint.ml @@ -310,7 +310,8 @@ let conj (x : t) (y : t) : t = let disj (x : t) (y : t) : t = BFun (Or, x, y) -let forall (vars : int list) (x : t) : t = Forall (vars, x) +let forall (vars : int list) (x : t) : t = + if vars = [] then x else Forall (vars, x) let negate (x : t) : t = Not x |
