fixed EAnn

This commit is contained in:
sebastianselander 2023-03-28 10:07:30 +02:00
parent 4d3d90c6a3
commit 437c193ea8
2 changed files with 3 additions and 3 deletions

View file

@ -228,8 +228,10 @@ algoW :: Exp -> Infer (Subst, T.ExpT' Type)
algoW = \case algoW = \case
err@(EAnn e t) -> do err@(EAnn e t) -> do
(s1, (e', t')) <- exprErr (algoW e) err (s1, (e', t')) <- exprErr (algoW e) err
sub1 <- unify t t'
sub2 <- unify t' t
unless unless
(t `isMoreSpecificOrEq` t') (apply sub1 t == t' && apply sub2 t' == t)
( throwError $ ( throwError $
unwords unwords
[ "Annotated type:" [ "Annotated type:"

View file

@ -11,10 +11,8 @@ import Test.Hspec
import Prelude ( import Prelude (
Bool (..), Bool (..),
Either (..), Either (..),
IO,
fmap, fmap,
foldl1, foldl1,
mapM_,
not, not,
($), ($),
(.), (.),