X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=6dfda6b84fbeee125d1af01fff7ed64496cfb7b4;hb=586149353a755cf7ba7c0bd499a397c3c8230839;hp=29e708205918b5516049e228d9a89e965c3a4802;hpb=3de26aa3d728b06ee7bf658fec6a09855822d492;p=ghc-hetmet.git diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 29e7082..6dfda6b 100644 --- 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: -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 @@ -645,7 +645,7 @@ Here is how I would write clunky: -clunky env var1 var1 +clunky env var1 var2 | 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.) Stand-alone deriving declarations -GHC now allows stand-alone deriving declarations: +GHC now allows stand-alone deriving declarations, enabled by -fglasgow-exts: data Foo a = Bar a | Baz String