aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-08-10 13:18:05 +0200
committerBen Gamari <ben@smart-cactus.org>2015-08-10 13:18:05 +0200
commitb42db9318b156c9daf2ff819557bbceef2f14ef2 (patch)
tree56cfb6502b0b6ce76af8427249f35ce1ebf0f294 /haddock-api/src/Haddock/Convert.hs
parent3436273f6e87d9358f6c23ad5b6b2838ce573892 (diff)
parent62f3a12863121fa5b6c2787185e62cfa3f44bdd6 (diff)
Merge pull request #433 from adamse/split-hsbang
HsBang is split into HsSrcBang and HsImplBang
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs20
1 files changed, 8 insertions, 12 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index edf91ce5..7c9040a9 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -266,18 +266,14 @@ synifyDataCon use_gadt_syntax dc =
-- skip any EqTheta, use 'orig'inal syntax
ctx = synifyCtx theta
- linear_tys = zipWith (\ty bang ->
- let tySyn = synifyType WithinType ty
- src_bang = case bang of
- HsUnpack {} -> HsSrcBang Nothing SrcUnpack SrcStrict
- HsStrict -> HsSrcBang Nothing SrcNoUnpack SrcStrict
- HsLazy -> HsSrcBang Nothing NoSrcUnpack NoSrcStrictness
- _ -> bang
- in case src_bang of
- (HsSrcBang _ NoSrcUnpack NoSrcStrictness) -> tySyn
- _ -> noLoc $ HsBangTy bang tySyn
- )
- arg_tys (dataConSrcBangs dc)
+ linear_tys =
+ zipWith (\ty bang ->
+ let tySyn = synifyType WithinType ty
+ in case bang of
+ (HsSrcBang _ NoSrcUnpack NoSrcStrict) -> tySyn
+ bang' -> noLoc $ HsBangTy bang' tySyn)
+ arg_tys (dataConSrcBangs dc)
+
field_tys = zipWith (\field synTy -> noLoc $ ConDeclField
[synifyName field] synTy Nothing)
(dataConFieldLabels dc) linear_tys