diff options
author | Ćukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-07 16:11:30 +0200 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-08-21 18:31:31 +0100 |
commit | d4a48a121abb581611f4dd21a5c80d19cc5cf712 (patch) | |
tree | 6a5f200ba22b913394b51acb3d6c23454dafb229 /haddock-api | |
parent | ac1894067ce7bc5c34f1cd4d70c9e7fbeb6ae6dc (diff) |
Remove default methods from Hoogle class output.
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hoogle.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs index 914e3466..f174ebcf 100644 --- a/haddock-api/src/Haddock/Backends/Hoogle.hs +++ b/haddock-api/src/Haddock/Backends/Hoogle.hs @@ -20,6 +20,8 @@ import InstEnv (ClsInst(..)) import Haddock.GhcUtils import Haddock.Types hiding (Version) import Haddock.Utils hiding (out) + +import Bag import GHC import Outputable @@ -154,9 +156,11 @@ ppSig dflags x = ppSigWithDoc dflags x [] -- note: does not yet output documentation for class methods ppClass :: DynFlags -> TyClDecl Name -> [(Name, DocForDecl Name)] -> [String] -ppClass dflags x subdocs = out dflags x{tcdSigs=[]} : +ppClass dflags x subdocs = out dflags decl' : concatMap (flip (ppSigWithDoc dflags) subdocs . addContext . unL) (tcdSigs x) where + decl' = x { tcdSigs = [], tcdMeths = emptyBag } + addContext (TypeSig name (L l sig) nwcs) = TypeSig name (L l $ f sig) nwcs addContext (MinimalSig src sig) = MinimalSig src sig addContext _ = error "expected TypeSig" |