From ab45e736f6a4c720c3c69f4d3fccdd293a298806 Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 2 Jul 2008 22:01:38 +0000 Subject: More support for type families and associated types Now we just need to render the instances --- src/Haddock/Interface/Create.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Haddock/Interface') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index d2e616cc..1b6721e0 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -151,7 +151,7 @@ sortByLoc = map unLoc . sortBy (comparing getLoc) -- | Get all the entities in a class. The entities are sorted by their -- SrcLoc. -getClassEntities tcd = sortByLoc (docs ++ meths ++ sigs) +getClassEntities tcd = sortByLoc (docs ++ meths ++ sigs ++ ats) where docs = [ L l (DocEntity d) | L l d <- tcdDocs tcd ] @@ -163,6 +163,8 @@ getClassEntities tcd = sortByLoc (docs ++ meths ++ sigs) -- TODO: fixities sigs = [ L l $ DeclEntity name | L l (TypeSig (L _ name) _) <- tcdSigs tcd ] + ats = [ L l $ DeclEntity name | L l at <- tcdATs tcd + , let L _ name = tcdLName at ] -- | Get all the top level entities in a module. The entities are sorted by -- their SrcLoc. -- cgit v1.2.3