Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
obsidiansystems
GHC
Commits
d24fc63a
Commit
d24fc63a
authored
Nov 24, 2009
by
waern
Browse files
Add a note saying what Haddock relies on about Instance.is_dfun
parent
ae6378d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/types/InstEnv.lhs
View file @
d24fc63a
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment