aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Hoogle.hs
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-07 17:06:58 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:31:31 +0100
commit19205c89ea272faf3db38f9d3e219342db260efb (patch)
tree7e12dd008049d7cdfee6496e7a2804fd37664107 /haddock-api/src/Haddock/Backends/Hoogle.hs
parentd4a48a121abb581611f4dd21a5c80d19cc5cf712 (diff)
Add fixity declarations in Hoogle backend output.
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Hoogle.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Hoogle.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index f174ebcf..04f266af 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -28,6 +28,7 @@ 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
@@ -57,7 +58,8 @@ ppModule dflags iface =
"" : ppDocumentation dflags (ifaceDoc iface) ++
["module " ++ moduleString (ifaceMod iface)] ++
concatMap (ppExport dflags) (ifaceExportItems iface) ++
- concatMap (ppInstance dflags) (ifaceInstances iface)
+ concatMap (ppInstance dflags) (ifaceInstances iface) ++
+ concatMap (ppFixity dflags) (Map.toList $ ifaceFixMap iface)
---------------------------------------------------------------------
@@ -234,6 +236,10 @@ ppCtor dflags dat subdocs con
ResTyGADT _ x -> x
+ppFixity :: DynFlags -> (Name, Fixity) -> [String]
+ppFixity dflags (name, fixity) = [out dflags (FixitySig [noLoc name] fixity)]
+
+
---------------------------------------------------------------------
-- DOCUMENTATION