adapted changes to work

This commit is contained in:
sebastianselander 2023-03-28 15:35:48 +02:00
parent 59d9be87cb
commit 7f0dab6dcb
3 changed files with 37 additions and 34 deletions

View file

@ -64,8 +64,8 @@ instance RemoveTEVar a b => RemoveTEVar [a] [b] where
instance RemoveTEVar Type T.Type where
rmTEVar = \case
TLit lit -> pure $ T.TLit (coerce lit)
TVar tvar -> pure $ T.TVar tvar
TVar tvar -> pure $ T.TVar (coerce tvar)
TData name typs -> T.TData (coerce name) <$> rmTEVar typs
TFun t1 t2 -> liftA2 T.TFun (rmTEVar t1) (rmTEVar t2)
TAll tvar t -> T.TAll tvar <$> rmTEVar t
TAll tvar t -> T.TAll (coerce tvar) <$> rmTEVar t
TEVar _ -> throwError "NewType TEVar!"