[commit: haddock] wip/api-ann-hstylit-1, wip/api-ann-hstylit-2, wip/api-ann-hstylit-3, wip/api-ann-hstylit-4, wip/api-ann-hstylit-5: HsTyLit now has a SourceText field (5eef94b)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:33:56 UTC 2015


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

On branches: wip/api-ann-hstylit-1,wip/api-ann-hstylit-2,wip/api-ann-hstylit-3,wip/api-ann-hstylit-4,wip/api-ann-hstylit-5
Link       : http://git.haskell.org/haddock.git/commitdiff/5eef94be45732c802c0816e3103e12b9f9095e13

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

commit 5eef94be45732c802c0816e3103e12b9f9095e13
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Sun Nov 30 22:15:32 2014 +0200

    HsTyLit now has a SourceText field
    
    Summary:
    HsTyLit now has a SourceText field
    
    Depends on D538
    
    Reviewers: austin, Fuuzetsu
    
    Differential Revision: https://phabricator.haskell.org/D539


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

5eef94be45732c802c0816e3103e12b9f9095e13
 src/Haddock/Backends/LaTeX.hs      | 4 ++--
 src/Haddock/Backends/Xhtml/Decl.hs | 4 ++--
 src/Haddock/Convert.hs             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
index 801f313..f9ac096 100644
--- a/src/Haddock/Backends/LaTeX.hs
+++ b/src/Haddock/Backends/LaTeX.hs
@@ -948,8 +948,8 @@ ppr_mono_ty _ (HsTyLit t) u = ppr_tylit t u
 
 
 ppr_tylit :: HsTyLit -> Bool -> LaTeX
-ppr_tylit (HsNumTy n) _ = integer n
-ppr_tylit (HsStrTy s) _ = text (show s)
+ppr_tylit (HsNumTy _ n) _ = integer n
+ppr_tylit (HsStrTy _ s) _ = text (show s)
   -- XXX: Ok in verbatim, but not otherwise
   -- XXX: Do something with Unicode parameter?
 
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 85e00e9..3353afe 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -908,8 +908,8 @@ ppr_mono_ty _ (HsNamedWildcardTy name) _ q = ppDocName q Prefix True name
 ppr_mono_ty _ (HsTyLit n) _ _ = ppr_tylit n
 
 ppr_tylit :: HsTyLit -> Html
-ppr_tylit (HsNumTy n) = toHtml (show n)
-ppr_tylit (HsStrTy s) = toHtml (show s)
+ppr_tylit (HsNumTy _ n) = toHtml (show n)
+ppr_tylit (HsStrTy _ s) = toHtml (show s)
 
 
 ppr_fun_ty :: Int -> LHsType DocName -> LHsType DocName -> Unicode -> Qualification -> Html
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index dd769c2..e8f29d3 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -365,8 +365,8 @@ synifyType s forallty@(ForAllTy _tv _ty) =
 synifyType _ (LitTy t) = noLoc $ HsTyLit $ synifyTyLit t
 
 synifyTyLit :: TyLit -> HsTyLit
-synifyTyLit (NumTyLit n) = HsNumTy n
-synifyTyLit (StrTyLit s) = HsStrTy s
+synifyTyLit (NumTyLit n) = HsNumTy mempty n
+synifyTyLit (StrTyLit s) = HsStrTy mempty s
 
 synifyKindSig :: Kind -> LHsKind Name
 synifyKindSig k = synifyType WithinType k



More information about the ghc-commits mailing list