diff options
author | Neil Mitchell <unknown> | 2008-08-12 21:37:32 +0000 |
---|---|---|
committer | Neil Mitchell <unknown> | 2008-08-12 21:37:32 +0000 |
commit | 0af6f7cf9895160b56c732ac77100e394c0dc27c (patch) | |
tree | a808d765f51c813b7f150446e8bc1b2107be7f43 | |
parent | 8014ddbf8a61fa587bcfeb8008ce51027f2e91e4 (diff) |
Add support for type synonyms to Hoogle, was accidentally missing before (woops!)
-rw-r--r-- | src/Haddock/Backends/Hoogle.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs index f327209d..dbbc0058 100644 --- a/src/Haddock/Backends/Hoogle.hs +++ b/src/Haddock/Backends/Hoogle.hs @@ -88,6 +88,7 @@ ppExport (ExportDecl decl dc _) = doc dc ++ f (unL decl) where f (TyClD d@TyData{}) = ppData d f (TyClD d@ClassDecl{}) = ppClass d + f (TyClD d@TySynonym{}) = ppSynonym d f (ForD (ForeignImport name typ _)) = ppSig $ TypeSig name typ f (ForD (ForeignExport name typ _)) = ppSig $ TypeSig name typ f (SigD sig) = ppSig sig @@ -100,6 +101,10 @@ ppSig (TypeSig name sig) = [operator (out name) ++ " :: " ++ out sig] ppSig _ = [] +ppSynonym :: TyClDecl Name -> [String] +ppSynonym x = [out x] + + -- note: does not yet output documentation for class methods ppClass :: TyClDecl Name -> [String] ppClass x = out x{tcdSigs=[]} : |