aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorsimonpj <simonpj@microsoft.com>2010-05-07 13:21:09 +0000
committersimonpj <simonpj@microsoft.com>2010-05-07 13:21:09 +0000
commitc545e237063ca7341f696c5a352c0782be2c4d76 (patch)
tree310c317abf53353cfae1575ae144feb6fa9be5a4 /src/Haddock/Convert.hs
parentb4c37c66809c0df7b5de09bd438b79b12af17b4c (diff)
Minor wibbles to HsBang stuff
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs12
1 files changed, 7 insertions, 5 deletions
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