ref: 5beab480f8405138d16dd1bffcd56d67cbc2335e
parent: 763763f37fb5d16de3c91da15bb604ec33d762ba
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Thu Feb 8 19:24:30 EST 2024
Handle more cases
--- a/src/MicroHs/TCMonad.hs
+++ b/src/MicroHs/TCMonad.hs
@@ -288,7 +288,9 @@
go bound (EForall tvs ty) acc = go (map idKindIdent tvs ++ bound) ty acc
go bound (EApp fun arg) acc = go bound fun (go bound arg acc)
go _bound (EUVar _) acc = acc
- go _ _ _ = undefined
+ go _bound (ECon _) acc = acc
+ go bound (EOper e ies) acc = go bound e (foldr (\ (_, ee) -> go bound ee) acc ies)
+ go _ x _ = error ("freeTyVars: " ++ show x) -- impossibleShow xaddConstraints :: [EConstraint] -> EType -> EType
addConstraints [] t = t
@@ -324,4 +326,3 @@
tImplies :: EType -> EType -> EType
tImplies a r = tApp (tApp (tConI builtinLoc "Primitives.=>") a) r
-
--
⑨