summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-06-28 23:20:37 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-27 21:35:17 -0400
commit9da20e3de5513ccccf8144c69f5e63dd4eaae6f4 (patch)
tree6572af17acbcf3ec43ac7fa2c6989f8edc92535e
parentcab890f73b534375135d372ba9f7eb8f5f523e16 (diff)
downloadhaskell-9da20e3de5513ccccf8144c69f5e63dd4eaae6f4.tar.gz
Don't abort on representation polymorphism check
This is reverting a change introduced in linear types commit 40fa237e1da. Previously, we had to abort early, but thanks to later changes, this is no longer needed. There's no test, but the behavior should be better. The plan is to remove levity polymorphism checking in the desugarer anyway.
-rw-r--r--compiler/GHC/HsToCore/Monad.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/HsToCore/Monad.hs b/compiler/GHC/HsToCore/Monad.hs
index 6fd3ef10c4..9ae0b78418 100644
--- a/compiler/GHC/HsToCore/Monad.hs
+++ b/compiler/GHC/HsToCore/Monad.hs
@@ -600,7 +600,7 @@ discardWarningsDs thing_inside
dsNoLevPoly :: Type -> LevityCheckProvenance -> DsM ()
-- See Note [Representation polymorphism checking]
dsNoLevPoly ty provenance =
- checkForLevPolyX (\ty -> failWithDs . DsLevityPolyInType ty) provenance ty
+ checkForLevPolyX (\ty -> diagnosticDs . DsLevityPolyInType ty) provenance ty
-- | Check an expression for representation polymorphism, failing if it is
-- representation-polymorphic.