Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
3ab407aa
Commit
3ab407aa
authored
Dec 13, 2011
by
Ian Lynagh
Browse files
Fix users_guide markup
parent
4c6dda01
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/users_guide/glasgow_exts.xml
View file @
3ab407aa
...
...
@@ -4356,7 +4356,7 @@ allows you to do so. For example:
data T a = MkT a a
instance Eq a => Eq (T a) where
(==) :: T a -> T a -> Bool -- The signature
(==) (MkT x1 x2) (MkTy y1 y2) = x1==y1
&
&
x2==y2
(==) (MkT x1 x2) (MkTy y1 y2) = x1==y1
&
amp;&
x2==y2
</programlisting>
The type signature in the instance declaration must be precisely the same as
the one in the class declaration, instantiated with the instance type.
...
...
@@ -4377,7 +4377,7 @@ instance C a => C (T a) where
</programlisting>
Provided that you also specify
<option>
-XScopedTypeVariables
</option>
(
<xref
linkend=
"scoped-type-variables"
/>
),
the
<literal>
forall b
</
fo
ral
l
>
scopes over the definition of
<literal>
foo
</literal>
,
the
<literal>
forall b
</
lite
ral>
scopes over the definition of
<literal>
foo
</literal>
,
and in particular over the type signature for
<literal>
xs
</literal>
.
</para>
</sect3>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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