summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-07-10 13:28:59 +0200
committersheaf <sam.derbyshire@gmail.com>2021-07-10 13:29:03 +0200
commit901f0e1b38730401a3e74d25a0b041ce551797c9 (patch)
tree297b44cafd28b33dc866360d69ee22b951803c12 /compiler/GHC/Hs
parent2d4cdfda6a7f068fe4a1cf586ccb2866b35e0250 (diff)
downloadhaskell-901f0e1b38730401a3e74d25a0b041ce551797c9.tar.gz
Don't return unitExpr in dsWhenNoErrs
- fixes #18149 and #14765 dsWhenNoErrs now returns "runtimeError @ty" when disallowed representation polymorphism is detected, where ty is the type of the result CoreExpr. "ty" is passed as an additional argument to dsWhenNoErrs, and is used only in the case of such an error. The calls to dsWhenNoErrs must now compute the type of the CoreExpr they are trying to build, so that an error of the right type can be used in case of a representation polymorphism failure.
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Syn/Type.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Hs/Syn/Type.hs b/compiler/GHC/Hs/Syn/Type.hs
index 1c9b1706bd..58af03f481 100644
--- a/compiler/GHC/Hs/Syn/Type.hs
+++ b/compiler/GHC/Hs/Syn/Type.hs
@@ -5,7 +5,7 @@
-- this task, see #12706, #15320, #16804, and #17331.
module GHC.Hs.Syn.Type (
-- * Extracting types from HsExpr
- lhsExprType, hsExprType,
+ lhsExprType, hsExprType, hsWrapperType,
-- * Extracting types from HsSyn
hsLitType, hsPatType, hsLPatType