fixed EAnn
This commit is contained in:
parent
4d3d90c6a3
commit
437c193ea8
2 changed files with 3 additions and 3 deletions
|
|
@ -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:"
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@ import Test.Hspec
|
|||
import Prelude (
|
||||
Bool (..),
|
||||
Either (..),
|
||||
IO,
|
||||
fmap,
|
||||
foldl1,
|
||||
mapM_,
|
||||
not,
|
||||
($),
|
||||
(.),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue