summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-10-28 13:30:09 +0000
committersimonpj@microsoft.com <unknown>2008-10-28 13:30:09 +0000
commitbc35c8edb6c1ee607d17e381c19820b3f026e59f (patch)
treec081af6b63d2d95d06b17ccb24e0d1d6a3a6a07b /docs
parenta5984078ff9369276c92135a80027ce7d98d1c56 (diff)
downloadhaskell-bc35c8edb6c1ee607d17e381c19820b3f026e59f.tar.gz
Clarify documentatoin
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index aafe421c67..78983eb06b 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -5322,9 +5322,13 @@ f xs = ys ++ ys
ys :: [a]
ys = reverse xs
</programlisting>
-The type signature for <literal>f</literal> brings the type variable <literal>a</literal> into scope; it scopes over
-the entire definition of <literal>f</literal>.
-In particular, it is in scope at the type signature for <varname>ys</varname>.
+The type signature for <literal>f</literal> brings the type variable <literal>a</literal> into scope,
+because of the explicit <literal>forall</literal> (<xref linkend="decl-type-sigs"/>).
+The type variables bound by a <literal>forall</literal> scope over
+the entire definition of the accompanying value declaration.
+In this example, the type variable <literal>a</literal> scopes over the whole
+definition of <literal>f</literal>, including over
+the type signature for <varname>ys</varname>.
In Haskell 98 it is not possible to declare
a type for <varname>ys</varname>; a major benefit of scoped type variables is that
it becomes possible to do so.