From 0af6f7cf9895160b56c732ac77100e394c0dc27c Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Tue, 12 Aug 2008 21:37:32 +0000 Subject: Add support for type synonyms to Hoogle, was accidentally missing before (woops!) --- src/Haddock/Backends/Hoogle.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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=[]} : -- cgit v1.2.3