[commit: haddock] 2.17.3.1-spanfix, T9858, alexbiehl-patch-1, ghc-8.0, ghc-8.0-facebook, ghc-head, ghc-head1, haddock-quick, headdock-library-1.4.5, ie_avails, issue-303, issue-475, master, mpickering/import, pr-filter-maps, pr/cabal-desc, travis, v2.17, v2.17.3, v2.18, wip-located-module-as, wip/10692-3, wip/D2418, wip/T11017, wip/T11019, wip/T11028, wip/T11028-2, wip/T11028-3, wip/T11080-open-data-kinds, wip/T11258, wip/T11430, wip/T12105, wip/T12105-2, wip/T12942, wip/T13163, wip/T14529, wip/T3384, wip/embelleshed-rdr, wip/import2, wip/new-tree-one-param, wip/orf-reboot, wip/rae, wip/rae-nokinds, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/spj-wildcard-refactor, wip/spj-wildcard-refactor2, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: StrictData: changes in HsBang type (5eb0785)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:32:58 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: 2.17.3.1-spanfix,T9858,alexbiehl-patch-1,ghc-8.0,ghc-8.0-facebook,ghc-head,ghc-head1,haddock-quick,headdock-library-1.4.5,ie_avails,issue-303,issue-475,master,mpickering/import,pr-filter-maps,pr/cabal-desc,travis,v2.17,v2.17.3,v2.18,wip-located-module-as,wip/10692-3,wip/D2418,wip/T11017,wip/T11019,wip/T11028,wip/T11028-2,wip/T11028-3,wip/T11080-open-data-kinds,wip/T11258,wip/T11430,wip/T12105,wip/T12105-2,wip/T12942,wip/T13163,wip/T14529,wip/T3384,wip/embelleshed-rdr,wip/import2,wip/new-tree-one-param,wip/orf-reboot,wip/rae,wip/rae-nokinds,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/spj-wildcard-refactor,wip/spj-wildcard-refactor2,wip/ttg-2017-10-13,wip/ttg-2017-10-31,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/5eb0785cde60997f072c3bdfefaf8c389c96d42e

>---------------------------------------------------------------

commit 5eb0785cde60997f072c3bdfefaf8c389c96d42e
Author: Adam Sandberg Eriksson <adam at sandbergericsson.se>
Date:   Wed Jul 8 15:03:04 2015 +0200

    StrictData: changes in HsBang type


>---------------------------------------------------------------

5eb0785cde60997f072c3bdfefaf8c389c96d42e
 haddock-api/src/Haddock/Backends/LaTeX.hs      | 10 +++++-----
 haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 10 +++++-----
 haddock-api/src/Haddock/Convert.hs             |  8 ++++----
 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 86a6909..d85d75d 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/src/Haddock/Backends/LaTeX.hs
@@ -823,11 +823,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 2da4cc1..21ef167 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -769,11 +769,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 c11ca54..edf91ce 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -269,12 +269,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)



More information about the ghc-commits mailing list