diff options
-rw-r--r-- | haddock-api/src/Haddock/GhcUtils.hs | 6 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 47 | ||||
-rw-r--r-- | html-test/ref/BundledPatterns.html | 2 | ||||
-rw-r--r-- | html-test/ref/BundledPatterns2.html | 2 | ||||
-rw-r--r-- | html-test/ref/Identifiers.html | 18 | ||||
-rw-r--r-- | hypsrc-test/Main.hs | 2 |
6 files changed, 37 insertions, 40 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs index b8db6dfd..2fc42131 100644 --- a/haddock-api/src/Haddock/GhcUtils.hs +++ b/haddock-api/src/Haddock/GhcUtils.hs @@ -338,7 +338,7 @@ reparenTypePrec = go where -- Shorter name for 'reparenType' - go :: XParTy a ~ ApiAnn' AnnParen => Precedence -> HsType a -> HsType a + go :: XParTy a ~ EpAnn' AnnParen => Precedence -> HsType a -> HsType a go _ (HsBangTy x b ty) = HsBangTy x b (reparenLType ty) go _ (HsTupleTy x con tys) = HsTupleTy x con (map reparenLType tys) go _ (HsSumTy x tys) = HsSumTy x (map reparenLType tys) @@ -378,11 +378,11 @@ reparenTypePrec = go go _ t@XHsType{} = t -- Located variant of 'go' - goL :: XParTy a ~ ApiAnn' AnnParen => Precedence -> LHsType a -> LHsType a + goL :: XParTy a ~ EpAnn' AnnParen => Precedence -> LHsType a -> LHsType a goL ctxt_prec = mapXRec @a (go ctxt_prec) -- Optionally wrap a type in parens - paren :: XParTy a ~ ApiAnn' AnnParen + paren :: XParTy a ~ EpAnn' AnnParen => Precedence -- Precedence of context -> Precedence -- Precedence of top-level operator -> HsType a -> HsType a -- Wrap in parens if (ctxt >= op) diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 5c6f09a3..d9943e55 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -727,38 +727,35 @@ type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA type instance Anno (HsSigType DocNameI) = SrcSpanAnnA type XRecCond a - = ( XParTy a ~ ApiAnn' AnnParen - -- , XParTy (NoGhcTc a) ~ ApiAnn' AnnParen - -- , NoGhcTcPass (NoGhcTcPass a) ~ NoGhcTcPass a - -- , IsPass a + = ( XParTy a ~ EpAnn' AnnParen , NoGhcTc a ~ a , MapXRec a , UnXRec a , WrapXRec a (HsType a) ) -type instance XForAllTy DocNameI = ApiAnn -type instance XQualTy DocNameI = ApiAnn -type instance XTyVar DocNameI = ApiAnn -type instance XStarTy DocNameI = ApiAnn -type instance XAppTy DocNameI = ApiAnn -type instance XAppKindTy DocNameI = ApiAnn -type instance XFunTy DocNameI = ApiAnn -type instance XListTy DocNameI = ApiAnn' AnnParen -type instance XTupleTy DocNameI = ApiAnn' AnnParen -type instance XSumTy DocNameI = ApiAnn' AnnParen -type instance XOpTy DocNameI = ApiAnn -type instance XParTy DocNameI = ApiAnn' AnnParen -type instance XIParamTy DocNameI = ApiAnn -type instance XKindSig DocNameI = ApiAnn +type instance XForAllTy DocNameI = EpAnn +type instance XQualTy DocNameI = EpAnn +type instance XTyVar DocNameI = EpAnn +type instance XStarTy DocNameI = EpAnn +type instance XAppTy DocNameI = EpAnn +type instance XAppKindTy DocNameI = EpAnn +type instance XFunTy DocNameI = EpAnn +type instance XListTy DocNameI = EpAnn' AnnParen +type instance XTupleTy DocNameI = EpAnn' AnnParen +type instance XSumTy DocNameI = EpAnn' AnnParen +type instance XOpTy DocNameI = EpAnn +type instance XParTy DocNameI = EpAnn' AnnParen +type instance XIParamTy DocNameI = EpAnn +type instance XKindSig DocNameI = EpAnn type instance XSpliceTy DocNameI = Void -- see `renameHsSpliceTy` -type instance XDocTy DocNameI = ApiAnn -type instance XBangTy DocNameI = ApiAnn -type instance XRecTy DocNameI = ApiAnn -type instance XExplicitListTy DocNameI = ApiAnn -type instance XExplicitTupleTy DocNameI = ApiAnn -type instance XTyLit DocNameI = ApiAnn -type instance XWildCardTy DocNameI = ApiAnn +type instance XDocTy DocNameI = EpAnn +type instance XBangTy DocNameI = EpAnn +type instance XRecTy DocNameI = EpAnn +type instance XExplicitListTy DocNameI = EpAnn +type instance XExplicitTupleTy DocNameI = EpAnn +type instance XTyLit DocNameI = EpAnn +type instance XWildCardTy DocNameI = EpAnn type instance XXType DocNameI = HsCoreTy type instance XHsForAllVis DocNameI = NoExtField diff --git a/html-test/ref/BundledPatterns.html b/html-test/ref/BundledPatterns.html index 82f58e49..8ac16a68 100644 --- a/html-test/ref/BundledPatterns.html +++ b/html-test/ref/BundledPatterns.html @@ -152,7 +152,7 @@ > subscript starting from 0 and ending at <code ><code - ><a href="#" title="Data.List" + ><a href="#" title="Data.Foldable" >length</a ></code > - 1</code diff --git a/html-test/ref/BundledPatterns2.html b/html-test/ref/BundledPatterns2.html index 56a44f57..fff9d572 100644 --- a/html-test/ref/BundledPatterns2.html +++ b/html-test/ref/BundledPatterns2.html @@ -154,7 +154,7 @@ > subscript starting from 0 and ending at <code ><code - ><a href="#" title="Data.List" + ><a href="#" title="Data.Foldable" >length</a ></code > - 1</code diff --git a/html-test/ref/Identifiers.html b/html-test/ref/Identifiers.html index b7ca9296..b177266d 100644 --- a/html-test/ref/Identifiers.html +++ b/html-test/ref/Identifiers.html @@ -146,8 +146,8 @@ >++</a ></code >, <code - ><a href="#" title="Data.List" - >elem</a + ><a href="#" title="Data.Foldable" + >Foldable</a ></code ></li ><li @@ -168,8 +168,8 @@ >, <code >++</code >, <code - ><a href="#" title="Data.List" - >elem</a + ><a href="#" title="Data.Foldable" + >Foldable</a ></code >, <code >elem</code @@ -237,23 +237,23 @@ ><li >Unqualified: <code >1 <code - ><a href="#" title="Data.List" - >`elem`</a + ><a href="#" title="Data.Foldable" + >`Foldable`</a ></code > [-3..3]</code ></li ><li >Qualified: <code >1 <code - ><a href="#" title="Data.List" + ><a href="#" title="GHC.List" >`elem`</a ></code > [-3..3]</code ></li ><li >Namespaced: <code - ><a href="#" title="Data.List" - >`elem`</a + ><a href="#" title="Data.Foldable" + >`Foldable`</a ></code >, <code >`elem`</code diff --git a/hypsrc-test/Main.hs b/hypsrc-test/Main.hs index f7614927..e7afb61c 100644 --- a/hypsrc-test/Main.hs +++ b/hypsrc-test/Main.hs @@ -2,7 +2,7 @@ import Data.Char -import Data.List +import Data.List (isPrefixOf) import Data.Function (on) import System.Environment |