[commit: haddock] wip/D538: HsTyLit now has a SourceText field (8b4886a)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:35:17 UTC 2015


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

On branch  : wip/D538
Link       : http://git.haskell.org/haddock.git/commitdiff/8b4886a617ac72a4b80e672beda98c5bd02aa33f

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

commit 8b4886a617ac72a4b80e672beda98c5bd02aa33f
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


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

8b4886a617ac72a4b80e672beda98c5bd02aa33f
 haddock-api/src/Haddock/Backends/LaTeX.hs      | 4 ++--
 haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 4 ++--
 haddock-api/src/Haddock/Convert.hs             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index b717fc0..9bac9d0 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/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/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index 3bf4322..ae89fb3 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -907,8 +907,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/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 1b1a8a8..4c019bc 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -384,8 +384,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