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
|
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:"
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,8 @@ import Test.Hspec
|
||||||
import Prelude (
|
import Prelude (
|
||||||
Bool (..),
|
Bool (..),
|
||||||
Either (..),
|
Either (..),
|
||||||
IO,
|
|
||||||
fmap,
|
fmap,
|
||||||
foldl1,
|
foldl1,
|
||||||
mapM_,
|
|
||||||
not,
|
not,
|
||||||
($),
|
($),
|
||||||
(.),
|
(.),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue