summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-06-28 23:20:37 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-07-23 15:23:31 +0200
commitc5229e2e0f4ec9c0e91f7c1555031eab68a73962 (patch)
tree7769ce97feae1fca40e1aa39c78040edf7cee4c6
parente2b08ec96aaacb66fcb6baa591e13b9bcc1a384b (diff)
downloadhaskell-wip/T17697.tar.gz
Don't abort on representation polymorphism checkwip/T17697
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.