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
err@(EAnn e t) -> do
(s1, (e', t')) <- exprErr (algoW e) err
sub1 <- unify t t'
sub2 <- unify t' t
unless
(t `isMoreSpecificOrEq` t')
(apply sub1 t == t' && apply sub2 t' == t)
( throwError $
unwords
[ "Annotated type:"

View file

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