aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorAdam Sandberg Eriksson <adam@sandbergericsson.se>2015-07-08 15:03:04 +0200
committerMatthew Pickering <matthewtpickering@gmail.com>2015-12-14 15:14:06 +0000
commit2d38f9b34a19b77f4260e8a0291156dace1d63fc (patch)
tree9450cca8a3691ae5da7bba457ea495fd562bb70c /haddock-api
parentf6c317bf8828378549d48d68f118fd9f0f919f82 (diff)
StrictData: changes in HsBang type
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/LaTeX.hs10
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs10
-rw-r--r--haddock-api/src/Haddock/Convert.hs8
3 files changed, 14 insertions, 14 deletions
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index e631acc6..df2e6b61 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/src/Haddock/Backends/LaTeX.hs
@@ -825,11 +825,11 @@ pp_hs_context cxt unicode = parenList (map (ppType unicode) cxt)
ppBang :: HsBang -> LaTeX
-ppBang HsStrict = char '!'
-ppBang (HsUnpack {}) = char '!'
-ppBang (HsSrcBang _ _ (Just True)) = char '!'
-ppBang (HsSrcBang _ _ (Just False)) = char '~'
-ppBang _ = empty
+ppBang HsStrict = char '!'
+ppBang (HsUnpack {}) = char '!'
+ppBang (HsSrcBang _ _ SrcStrict) = char '!'
+ppBang (HsSrcBang _ _ SrcLazy) = char '~'
+ppBang _ = empty
tupleParens :: HsTupleSort -> [LaTeX] -> LaTeX
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index f01365e9..d0e7f890 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -865,11 +865,11 @@ ppDataHeader _ _ _ _ = error "ppDataHeader: illegal argument"
ppBang :: HsBang -> Html
-ppBang HsStrict = toHtml "!"
-ppBang (HsUnpack {}) = toHtml "!"
-ppBang (HsSrcBang _ _ (Just True)) = toHtml "!"
-ppBang (HsSrcBang _ _ (Just False)) = toHtml "~"
-ppBang _ = noHtml
+ppBang HsStrict = toHtml "!"
+ppBang (HsUnpack {}) = toHtml "!"
+ppBang (HsSrcBang _ _ SrcStrict) = toHtml "!"
+ppBang (HsSrcBang _ _ SrcLazy) = toHtml "~"
+ppBang _ = noHtml
tupleParens :: HsTupleSort -> [Html] -> Html
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index e8ed148c..e6361ed1 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -270,12 +270,12 @@ synifyDataCon use_gadt_syntax dc =
linear_tys = zipWith (\ty bang ->
let tySyn = synifyType WithinType ty
src_bang = case bang of
- HsUnpack {} -> HsSrcBang Nothing (Just True) (Just True)
- HsStrict -> HsSrcBang Nothing (Just False) (Just True)
- HsLazy -> HsSrcBang Nothing Nothing Nothing
+ HsUnpack {} -> HsSrcBang Nothing SrcUnpack SrcStrict
+ HsStrict -> HsSrcBang Nothing SrcNoUnpack SrcStrict
+ HsLazy -> HsSrcBang Nothing NoSrcUnpack NoSrcStrictness
_ -> bang
in case src_bang of
- (HsSrcBang _ Nothing Nothing) -> tySyn
+ (HsSrcBang _ NoSrcUnpack NoSrcStrictness) -> tySyn
_ -> noLoc $ HsBangTy bang tySyn
)
arg_tys (dataConSrcBangs dc)