diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-11-13 09:40:34 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2017-11-14 23:14:26 +0200 |
commit | 134a7bb054ea730b13c8629a76232d73e3ace049 (patch) | |
tree | f7a8e6d9d85db189ed0e59c003e4431b06a520c2 /haddock-api/src/Haddock/Interface/Create.hs | |
parent | 5b87430a116235940e76c6d9302b34cf64cd8b95 (diff) |
Clean up use of PlaceHolder, to match TTG
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 357cd780..048126cf 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -1057,18 +1057,18 @@ extractPatternSyn nm t tvs cons = typ = longArrow args (data_ty con) typ' = case con of - ConDeclH98 { con_cxt = Just cxt } -> noLoc (HsQualTy PlaceHolder cxt typ) + ConDeclH98 { con_cxt = Just cxt } -> noLoc (HsQualTy noExt cxt typ) _ -> typ - typ'' = noLoc (HsQualTy PlaceHolder (noLoc []) typ') + typ'' = noLoc (HsQualTy noExt (noLoc []) typ') in PatSynSig [noLoc nm] (mkEmptyImplicitBndrs typ'') longArrow :: [LHsType (GhcPass name)] -> LHsType (GhcPass name) -> LHsType (GhcPass name) - longArrow inputs output = foldr (\x y -> noLoc (HsFunTy PlaceHolder x y)) output inputs + longArrow inputs output = foldr (\x y -> noLoc (HsFunTy noExt x y)) output inputs data_ty con | ConDeclGADT{} <- con = hsib_body $ con_type con - | otherwise = foldl' (\x y -> noLoc (HsAppTy PlaceHolder x y)) - (noLoc (HsTyVar PlaceHolder NotPromoted (noLoc t))) tvs + | otherwise = foldl' (\x y -> noLoc (HsAppTy noExt x y)) + (noLoc (HsTyVar noExt NotPromoted (noLoc t))) tvs extractRecSel :: Name -> Name -> [LHsType GhcRn] -> [LConDecl GhcRn] -> LSig GhcRn @@ -1077,7 +1077,7 @@ extractRecSel _ _ _ [] = error "extractRecSel: selector not found" extractRecSel nm t tvs (L _ con : rest) = case getConDetails con of RecCon (L _ fields) | ((l,L _ (ConDeclField _nn ty _)) : _) <- matching_fields fields -> - L l (TypeSig [noLoc nm] (mkEmptySigWcType (noLoc (HsFunTy PlaceHolder data_ty (getBangType ty))))) + L l (TypeSig [noLoc nm] (mkEmptySigWcType (noLoc (HsFunTy noExt data_ty (getBangType ty))))) _ -> extractRecSel nm t tvs rest where matching_fields :: [LConDeclField GhcRn] -> [(SrcSpan, LConDeclField GhcRn)] @@ -1086,8 +1086,8 @@ extractRecSel nm t tvs (L _ con : rest) = data_ty -- ResTyGADT _ ty <- con_res con = ty | ConDeclGADT{} <- con = hsib_body $ con_type con - | otherwise = foldl' (\x y -> noLoc (HsAppTy PlaceHolder x y)) - (noLoc (HsTyVar PlaceHolder NotPromoted (noLoc t))) tvs + | otherwise = foldl' (\x y -> noLoc (HsAppTy noExt x y)) + (noLoc (HsTyVar noExt NotPromoted (noLoc t))) tvs -- | Keep export items with docs. pruneExportItems :: [ExportItem GhcRn] -> [ExportItem GhcRn] |