X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=052c9c3dea317662a2e163aa8a1dc30bef852cca;hp=f8ad5c1b0ac8a79f9ee96c6a4227e6abafcaa6e7;hb=b55fe864599e77f2ae2a3fbeec899ea7aeeac9f2;hpb=9da4639011348fb6c318e3cba4b08622f811d9c4
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index f8ad5c1..052c9c3 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -106,9 +106,7 @@ documentation describes all the libraries that come with GHC.
This option enables the language extension defined in the
- Haskell 98 Foreign Function Interface Addendum plus deprecated
- syntax of previous versions of the FFI for backwards
- compatibility.
+ Haskell 98 Foreign Function Interface Addendum.
New reserved words: foreign.
@@ -116,7 +114,7 @@ documentation describes all the libraries that come with GHC.
- ,:
+ ,:
These two flags control how generalisation is done.
@@ -3727,6 +3725,33 @@ the standard method is used or the one described here.)
+
+Stand-alone deriving declarations
+
+
+GHC now allows stand-alone deriving declarations:
+
+
+
+ data Foo = Bar Int | Baz String
+
+ deriving Eq for Foo
+
+
+Deriving instances of multi-parameter type classes for newtypes is
+also allowed:
+
+
+ newtype Foo a = MkFoo (State Int a)
+
+ deriving (MonadState Int) for Foo
+
+
+
+
+
+
+
Generalised typing of mutually recursive bindings
@@ -6105,6 +6130,22 @@ r) ->
described in this section. All are exported by
GHC.Exts.
+The seq function
+
+The function seq is as described in the Haskell98 Report.
+
+ seq :: a -> b -> b
+
+It evaluates its first argument to head normal form, and then returns its
+second argument as the result. The reason that it is documented here is
+that, despite seq's polymorphism, its
+second argument can have an unboxed type, or
+can be an unboxed tuple; for example (seq x 4#)
+or (seq x (# p,q #)). This requires b
+to be instantiated to an unboxed type, which is not usually allowed.
+
+
+
The inline function
The inline function is somewhat experimental.
@@ -6163,6 +6204,11 @@ If lazy were not lazy, par would
look strict in y which would defeat the whole
purpose of par.
+
+Like seq, the argument of lazy can have
+an unboxed type.
+
+
The unsafeCoerce# function
@@ -6178,7 +6224,14 @@ It is generally used when you want to write a program that you know is
well-typed, but where Haskell's type system is not expressive enough to prove
that it is well typed.
+
+The argument to unsafeCoerce# can have unboxed types,
+although extremely bad things will happen if you coerce a boxed type
+to an unboxed type.
+
+
+