aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-13 08:53:41 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-03-13 19:18:10 +0000
commiteaf0a0b51f452398f3c64882a334f90b920df794 (patch)
treee007ca9b2a8748ab9aeb135e813f91b673884f2f /src/Haddock/Convert.hs
parent64175d6ade5717b7e0c7fa0a122d16cae6779031 (diff)
Display minimal complete definitions for type classes
This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information.
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 1245b2b9..1bf02e3c 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -73,8 +73,9 @@ tyThingToLHsDecl t = noLoc $ case t of
, tcdFDs = map (\ (l,r) -> noLoc
(map getName l, map getName r) ) $
snd $ classTvsFds cl
- , tcdSigs = map (noLoc . synifyIdSig DeleteTopLevelQuantification)
- (classMethods cl)
+ , tcdSigs = noLoc (MinimalSig . fmap noLoc $ classMinimalDef cl) :
+ map (noLoc . synifyIdSig DeleteTopLevelQuantification)
+ (classMethods cl)
, tcdMeths = emptyBag --ignore default method definitions, they don't affect signature
-- class associated-types are a subset of TyCon:
, tcdATs = atFamDecls