aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Specialize.hs
diff options
context:
space:
mode:
authorGert-Jan Bottu <gertjan.bottu@kuleuven.be>2020-04-05 11:16:56 +0200
committerGert-Jan Bottu <gertjan.bottu@kuleuven.be>2020-05-15 22:09:44 +0200
commita8d7e66da4dcc3b242103271875261604be42d6e (patch)
treee468ca29b905b35f76318f547a173de401995672 /haddock-api/src/Haddock/Interface/Specialize.hs
parent97f301a63ea8461074bfaa1486eb798e4be65f15 (diff)
Explicit Specificity Support for Haddock
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Specialize.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Specialize.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs
index a939dfbd..cbfea762 100644
--- a/haddock-api/src/Haddock/Interface/Specialize.hs
+++ b/haddock-api/src/Haddock/Interface/Specialize.hs
@@ -60,8 +60,8 @@ specializeTyVarBndrs bndrs typs =
specialize $ zip bndrs' typs
where
bndrs' = map (bname . unLoc) . hsq_explicit $ bndrs
- bname (UserTyVar _ (L _ name)) = name
- bname (KindedTyVar _ (L _ name) _) = name
+ bname (UserTyVar _ _ (L _ name)) = name
+ bname (KindedTyVar _ _ (L _ name) _) = name
bname (XTyVarBndr _) = error "haddock:specializeTyVarBndrs"
@@ -291,10 +291,10 @@ renameLTypes = mapM renameLType
renameContext :: HsContext GhcRn -> Rename (IdP GhcRn) (HsContext GhcRn)
renameContext = renameLTypes
-renameBinder :: HsTyVarBndr GhcRn -> Rename (IdP GhcRn) (HsTyVarBndr GhcRn)
-renameBinder (UserTyVar x lname) = UserTyVar x <$> located renameName lname
-renameBinder (KindedTyVar x lname lkind) =
- KindedTyVar x <$> located renameName lname <*> located renameType lkind
+renameBinder :: HsTyVarBndr flag GhcRn -> Rename (IdP GhcRn) (HsTyVarBndr flag GhcRn)
+renameBinder (UserTyVar x fl lname) = UserTyVar x fl <$> located renameName lname
+renameBinder (KindedTyVar x fl lname lkind) =
+ KindedTyVar x fl <$> located renameName lname <*> located renameType lkind
-- | Core renaming logic.
renameName :: (Eq name, SetName name) => name -> Rename name name
@@ -348,7 +348,7 @@ located :: Functor f => (a -> f b) -> Located a -> f (Located b)
located f (L loc e) = L loc <$> f e
-tyVarName :: HsTyVarBndr name -> IdP name
-tyVarName (UserTyVar _ name) = unLoc name
-tyVarName (KindedTyVar _ (L _ name) _) = name
+tyVarName :: HsTyVarBndr flag name -> IdP name
+tyVarName (UserTyVar _ _ name) = unLoc name
+tyVarName (KindedTyVar _ _ (L _ name) _) = name
tyVarName (XTyVarBndr _ ) = error "haddock:tyVarName"