Fix test error message

This commit is contained in:
Martin Fredin 2023-04-05 17:41:17 +02:00
parent 9870802371
commit 05ea23d22c
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ rpuType typ = do
where
go tvars = \case
TAll tvar t
| tvar `elem` tvars -> throwError "Duplicate forall"
| tvar `elem` tvars -> throwError "Unused forall"
| otherwise -> go (tvar : tvars) t
TVar tvar -> pure (delete tvar tvars)
TFun t1 t2 -> go tvars t1 >>= (`go` t2)

View file

@ -28,7 +28,7 @@ test = hspec testReportForall
rp_unused1 = specify "Unused forall 1" $
"g : forall a. forall a. a -> (forall a. a -> a) -> a"
`shouldBeErrBi`
"Duplicate forall"
"Unused forall"
rp_unused2 = specify "Unused forall 2" $
"g : forall a. (forall a. a -> a) -> Int"