projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extended the debugger documentation with a 'tips' section
[ghc-hetmet.git]
/
docs
/
users_guide
/
glasgow_exts.xml
diff --git
a/docs/users_guide/glasgow_exts.xml
b/docs/users_guide/glasgow_exts.xml
index
29e7082
..
6dfda6b
100644
(file)
--- a/
docs/users_guide/glasgow_exts.xml
+++ b/
docs/users_guide/glasgow_exts.xml
@@
-620,7
+620,7
@@
to write clunky would be to use case expressions:
</para>
<programlisting>
</para>
<programlisting>
-clunky env var1 var1 = case lookup env var1 of
+clunky env var1 var2 = case lookup env var1 of
Nothing -> fail
Just val1 -> case lookup env var2 of
Nothing -> fail
Nothing -> fail
Just val1 -> case lookup env var2 of
Nothing -> fail
@@
-645,7
+645,7
@@
Here is how I would write clunky:
</para>
<programlisting>
</para>
<programlisting>
-clunky env var1 var1
+clunky env var1 var2
| Just val1 <- lookup env var1
, Just val2 <- lookup env var2
= val1 + val2
| Just val1 <- lookup env var1
, Just val2 <- lookup env var2
= val1 + val2
@@
-2069,7
+2069,7
@@
the standard method is used or the one described here.)
<title>Stand-alone deriving declarations</title>
<para>
<title>Stand-alone deriving declarations</title>
<para>
-GHC now allows stand-alone <literal>deriving</literal> declarations:
+GHC now allows stand-alone <literal>deriving</literal> declarations, enabled by <literal>-fglasgow-exts</literal>:
<programlisting>
data Foo a = Bar a | Baz String
<programlisting>
data Foo a = Bar a | Baz String