[commit: haddock] wip/api-ann-hstylit-5: Add Location in KindedTyVar (597c878)

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


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

On branch  : wip/api-ann-hstylit-5
Link       : http://git.haskell.org/haddock.git/commitdiff/597c878101eced8b506db54e25e8a703ac165cca

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

commit 597c878101eced8b506db54e25e8a703ac165cca
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Tue Dec 16 10:13:50 2014 +0200

    Add Location in KindedTyVar


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

597c878101eced8b506db54e25e8a703ac165cca
 src/Haddock/Convert.hs          | 4 ++--
 src/Haddock/Interface/Rename.hs | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 47ec777..61c7067 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -136,7 +136,7 @@ synifyTyCon coax tc
   = DataDecl { tcdLName = synifyName tc
              , tcdTyVars =       -- tyConTyVars doesn't work on fun/prim, but we can make them up:
                          let mk_hs_tv realKind fakeTyVar 
-                                = noLoc $ KindedTyVar (getName fakeTyVar) 
+                                = noLoc $ KindedTyVar (noLoc (getName fakeTyVar))
                                                       (synifyKindSig realKind)
                          in HsQTvs { hsq_kvs = []   -- No kind polymorphism
                                    , hsq_tvs = zipWith mk_hs_tv (fst (splitKindFunTys (tyConKind tc)))
@@ -292,7 +292,7 @@ synifyTyVars ktvs = HsQTvs { hsq_kvs = map tyVarName kvs
     (kvs, tvs) = partition isKindVar ktvs
     synifyTyVar tv 
       | isLiftedTypeKind kind = noLoc (UserTyVar name)
-      | otherwise             = noLoc (KindedTyVar name (synifyKindSig kind))
+      | otherwise             = noLoc (KindedTyVar (noLoc name) (synifyKindSig kind))
       where
         kind = tyVarKind tv
         name = getName tv
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 3f324f4..6c3e194 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -252,10 +252,10 @@ renameLTyVarBndr :: LHsTyVarBndr Name -> RnM (LHsTyVarBndr DocName)
 renameLTyVarBndr (L loc (UserTyVar n))
   = do { n' <- rename n
        ; return (L loc (UserTyVar n')) }
-renameLTyVarBndr (L loc (KindedTyVar n kind))
+renameLTyVarBndr (L loc (KindedTyVar (L lv n) kind))
   = do { n' <- rename n
        ; kind' <- renameLKind kind
-       ; return (L loc (KindedTyVar n' kind')) }
+       ; return (L loc (KindedTyVar (L lv n') kind')) }
 
 renameLContext :: Located [LHsType Name] -> RnM (Located [LHsType DocName])
 renameLContext (L loc context) = do



More information about the ghc-commits mailing list