aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Haddock/Backends/Html.hs6
-rw-r--r--src/Haddock/Convert.hs12
2 files changed, 8 insertions, 10 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index 24a9b3d2..8df0c84a 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -1516,11 +1516,7 @@ ppForAll Explicit ltvs lctxt =
ppBang :: HsBang -> Html
ppBang HsNoBang = empty
-ppBang HsStrict = toHtml "!"
-ppBang HsUnpack = toHtml "!" -- unboxed args is an implementation detail,
- -- so we just show the strictness annotation
-ppBang HsUnpackFailed = toHtml "!" -- unboxed args is an implementation detail,
-
+ppBang _ = toHtml "!" -- Unpacked args is an implementation detail,
tupleParens :: Boxity -> [Html] -> Html
tupleParens Boxed = parenList
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 7c409919..ac071660 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -167,12 +167,14 @@ synifyDataCon use_gadt_syntax dc = noLoc $
else synifyTyVars (dataConExTyVars dc)
-- skip any EqTheta, use 'orig'inal syntax
ctx = synifyCtx (dataConDictTheta dc)
- linear_tys = zipWith (\ty strict ->
+ linear_tys = zipWith (\ty bang ->
let tySyn = synifyType WithinType ty
- in case strict of
- -- HsNoBang never appears, it's implied instead.
- HsNoBang -> tySyn
- _ -> noLoc $ HsBangTy strict tySyn
+ in case bang of
+ HsUnpackFailed -> noLoc $ HsBangTy HsStrict tySyn
+ HsNoBang -> tySyn
+ -- HsNoBang never appears, it's implied instead.
+ _ -> noLoc $ HsBangTy bang tySyn
+
)
(dataConOrigArgTys dc) (dataConStrictMarks dc)
field_tys = zipWith (\field synTy -> ConDeclField