aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Yamamoto <kazu@iij.ad.jp>2013-02-06 11:12:28 +0900
committerKazu Yamamoto <kazu@iij.ad.jp>2013-02-06 11:12:28 +0900
commitba8711a3b3bada2a099e9484296cbd04becbdbb4 (patch)
tree8ac57d4e03c30c4033d4b095c099eda579509587
parent8d4c94ca5a969a5ebbb791939fb0195dc672429e (diff)
Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.)
-rw-r--r--src/Haddock/Interface/AttachInstances.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs
index 04c4e5e1..dea01d5f 100644
--- a/src/Haddock/Interface/AttachInstances.hs
+++ b/src/Haddock/Interface/AttachInstances.hs
@@ -32,6 +32,7 @@ import MonadUtils (liftIO)
import Name
import PrelNames
import TcRnDriver (tcRnGetInfo)
+import TcType (tcSplitSigmaTy)
import TyCon
import TypeRep
import TysPrim( funTyCon )
@@ -64,13 +65,13 @@ attachToExportItem expInfo iface ifaceMap instIfaceMap export =
expItemInstances =
case mb_info of
Just (_, _, instances) ->
+{-
let insts = map (first synifyInstHead) $ sortImage (first instHead)
[ (instanceSig i, getName i) | i <- instances ]
-{- FIXME
+-}
let insts = map (first synifyInstHead) $ sortImage (first instHead) $
filter (\((_,_,cls,tys),_) -> not $ isInstanceHidden expInfo cls tys)
[ (instanceHead' i, getName i) | i <- instances ]
--}
in [ (inst, lookupInstDoc name iface ifaceMap instIfaceMap)
| (inst, name) <- insts ]
Nothing -> []
@@ -100,14 +101,12 @@ lookupInstDoc name iface ifaceMap instIfaceMap =
-- | Like GHC's 'instanceHead' but drops "silent" arguments.
-{- FIXME
instanceHead' :: ClsInst -> ([TyVar], ThetaType, Class, [Type])
instanceHead' ispec = (tvs, dropSilentArgs dfun theta, cls, tys)
where
dfun = is_dfun ispec
- (tvs, theta, cls, tys) = instanceHead ispec
--}
-
+ (tvs, cls, tys) = instanceHead ispec
+ (_, theta, _) = tcSplitSigmaTy . idType . is_dfun $ ispec
-- | Drop "silent" arguments. See GHC Note [Silent superclass
-- arguments].