diff options
author | Adam Sandberg Eriksson <adam@sandbergericsson.se> | 2015-07-14 21:01:01 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2015-12-14 15:14:06 +0000 |
commit | ebf0eeb4dc364859016fb6984091ae585c8d3053 (patch) | |
tree | 8955949452873626dfb90a4a14659c99a74806a1 /haddock-api/src/Haddock/Convert.hs | |
parent | 81653061d333a1e7d6024e132b1a72a947b9b0ab (diff) |
HsBang is split into HsSrcBang and HsImplBang
With recent changes in GHC handling of strictness annotations in Haddock
is simplified.
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r-- | haddock-api/src/Haddock/Convert.hs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs index e6361ed1..7a8b1acb 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -267,18 +267,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 |