Fix test error message
This commit is contained in:
parent
9870802371
commit
05ea23d22c
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ rpuType typ = do
|
||||||
where
|
where
|
||||||
go tvars = \case
|
go tvars = \case
|
||||||
TAll tvar t
|
TAll tvar t
|
||||||
| tvar `elem` tvars -> throwError "Duplicate forall"
|
| tvar `elem` tvars -> throwError "Unused forall"
|
||||||
| otherwise -> go (tvar : tvars) t
|
| otherwise -> go (tvar : tvars) t
|
||||||
TVar tvar -> pure (delete tvar tvars)
|
TVar tvar -> pure (delete tvar tvars)
|
||||||
TFun t1 t2 -> go tvars t1 >>= (`go` t2)
|
TFun t1 t2 -> go tvars t1 >>= (`go` t2)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ test = hspec testReportForall
|
||||||
rp_unused1 = specify "Unused forall 1" $
|
rp_unused1 = specify "Unused forall 1" $
|
||||||
"g : forall a. forall a. a -> (forall a. a -> a) -> a"
|
"g : forall a. forall a. a -> (forall a. a -> a) -> a"
|
||||||
`shouldBeErrBi`
|
`shouldBeErrBi`
|
||||||
"Duplicate forall"
|
"Unused forall"
|
||||||
|
|
||||||
rp_unused2 = specify "Unused forall 2" $
|
rp_unused2 = specify "Unused forall 2" $
|
||||||
"g : forall a. (forall a. a -> a) -> Int"
|
"g : forall a. (forall a. a -> a) -> Int"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue