From 05ea23d22ca3945f5c8aa4f83743e6cbe15ea94e Mon Sep 17 00:00:00 2001 From: Martin Fredin Date: Wed, 5 Apr 2023 17:41:17 +0200 Subject: [PATCH] Fix test error message --- src/ReportForall.hs | 2 +- tests/TestReportForall.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReportForall.hs b/src/ReportForall.hs index 978dde5..8ac8515 100644 --- a/src/ReportForall.hs +++ b/src/ReportForall.hs @@ -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) diff --git a/tests/TestReportForall.hs b/tests/TestReportForall.hs index 6dab292..d4e49d7 100644 --- a/tests/TestReportForall.hs +++ b/tests/TestReportForall.hs @@ -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"