projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor type printing amomaly
[ghc-hetmet.git]
/
compiler
/
types
/
InstEnv.lhs
diff --git
a/compiler/types/InstEnv.lhs
b/compiler/types/InstEnv.lhs
index
b3d8dcc
..
09b9b53
100644
(file)
--- a/
compiler/types/InstEnv.lhs
+++ b/
compiler/types/InstEnv.lhs
@@
-45,7
+45,6
@@
import Data.Maybe ( isJust, isNothing )
%************************************************************************
\begin{code}
%************************************************************************
\begin{code}
-type DFunId = Id
data Instance
= Instance { is_cls :: Name -- Class name
data Instance
= Instance { is_cls :: Name -- Class name
@@
-59,7
+58,7
@@
data Instance
-- INVARIANT: is_dfun Id has type
-- forall is_tvs. (...) => is_cls is_tys
-- INVARIANT: is_dfun Id has type
-- forall is_tvs. (...) => is_cls is_tys
- , is_dfun :: DFunId
+ , is_dfun :: DFunId -- See Note [Haddock assumptions]
, is_flag :: OverlapFlag -- See detailed comments with
-- the decl of BasicTypes.OverlapFlag
}
, is_flag :: OverlapFlag -- See detailed comments with
-- the decl of BasicTypes.OverlapFlag
}
@@
-99,7
+98,20
@@
However, note that:
(This is so that we can use the matching substitution to
instantiate the dfun's context.)
(This is so that we can use the matching substitution to
instantiate the dfun's context.)
+Note [Haddock assumptions]
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+For normal user-written instances, Haddock relies on
+ * the SrcSpan of
+ * the Name of
+ * the is_dfun of
+ * an Instance
+
+being equal to
+
+ * the SrcSpan of
+ * the instance head type of
+ * the InstDecl used to construct the Instance.
\begin{code}
instanceDFunId :: Instance -> DFunId
\begin{code}
instanceDFunId :: Instance -> DFunId