diff options
author | Ćukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-07 18:29:55 +0200 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-08-21 18:31:31 +0100 |
commit | d070abf3e2348d02f8698c653ca2247e913d222e (patch) | |
tree | 81941774d1a7633e42b6656bfab1f36c073be4d9 /haddock-api/src/Haddock/Backends | |
parent | 19205c89ea272faf3db38f9d3e219342db260efb (diff) |
Fix bug with incorrect fixities being generated in Hoogle backend.
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hoogle.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs index 04f266af..cd015c03 100644 --- a/haddock-api/src/Haddock/Backends/Hoogle.hs +++ b/haddock-api/src/Haddock/Backends/Hoogle.hs @@ -28,7 +28,6 @@ import Outputable import Data.Char import Data.List import Data.Maybe -import qualified Data.Map as Map import Data.Version import System.FilePath import System.IO @@ -58,8 +57,7 @@ ppModule dflags iface = "" : ppDocumentation dflags (ifaceDoc iface) ++ ["module " ++ moduleString (ifaceMod iface)] ++ concatMap (ppExport dflags) (ifaceExportItems iface) ++ - concatMap (ppInstance dflags) (ifaceInstances iface) ++ - concatMap (ppFixity dflags) (Map.toList $ ifaceFixMap iface) + concatMap (ppInstance dflags) (ifaceInstances iface) --------------------------------------------------------------------- @@ -124,6 +122,7 @@ ppExport :: DynFlags -> ExportItem Name -> [String] ppExport dflags ExportDecl { expItemDecl = L _ decl , expItemMbDoc = (dc, _) , expItemSubDocs = subdocs + , expItemFixities = fixities } = ppDocumentation dflags dc ++ f decl where f (TyClD d@DataDecl{}) = ppData dflags d subdocs @@ -131,8 +130,10 @@ ppExport dflags ExportDecl { expItemDecl = L _ decl f (TyClD d@ClassDecl{}) = ppClass dflags d subdocs f (ForD (ForeignImport name typ _ _)) = ppSig dflags $ TypeSig [name] typ [] f (ForD (ForeignExport name typ _ _)) = ppSig dflags $ TypeSig [name] typ [] - f (SigD sig) = ppSig dflags sig + f (SigD sig) = ppSig dflags sig ++ ppFixities f _ = [] + + ppFixities = concatMap (ppFixity dflags) fixities ppExport _ _ = [] ppSigWithDoc :: DynFlags -> Sig Name -> [(Name, DocForDecl Name)] -> [String] |