diff options
author | David Waern <david.waern@gmail.com> | 2009-11-24 21:03:08 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-11-24 21:03:08 +0000 |
commit | d24fc63ae1a193917d35ef3d4e31aba4e283267d (patch) | |
tree | c5525da7b2bb5404bac57b79d25b9a16e8489fd5 | |
parent | ae6378d0e49a3ffb68c58fb71dfa01ae13bd680f (diff) | |
download | haskell-d24fc63ae1a193917d35ef3d4e31aba4e283267d.tar.gz |
Add a note saying what Haddock relies on about Instance.is_dfun
-rw-r--r-- | compiler/types/InstEnv.lhs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler/types/InstEnv.lhs b/compiler/types/InstEnv.lhs index b3d8dccc53..49b49b83e1 100644 --- a/compiler/types/InstEnv.lhs +++ b/compiler/types/InstEnv.lhs @@ -59,7 +59,7 @@ data Instance -- 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 } @@ -99,7 +99,20 @@ However, note that: (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 |