ref: e8f8e6e12200daae67096def5099eef7d13e0b5a
parent: 4a0b0de0296d6792d81ebd4f3428b5a11138b939
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Fri Sep 22 16:48:02 EDT 2023
Add comment explaining why rank-2 types are broken.
--- a/src/MicroHs/TypeCheck.hs
+++ b/src/MicroHs/TypeCheck.hs
@@ -759,7 +759,9 @@
(e, t) <- tLookupInst "variable" i
case mt of
Just tu@(EForall _ tt) -> T.do
- unify loc tt t -- XXX is this really sufficient?
+ -- XXX This is wrong in many ways.
+ -- Both t and tt may contain unification variables bound elsewhere.
+ unify loc tt t
T.return (e, tu)
_ -> T.do
munify loc mt t
--
⑨