X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=3b83551e1276bcd2b9a71c676abbebdb756daa2c;hb=5e04ae341a945ef430e9d941b34722b8de1f6aae;hp=de69b6006300bca4e780cccf406da4a5a64d67bd;hpb=67cb409159fa9136dff942b8baaec25909416022;p=ghc-hetmet.git
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index de69b60..3b83551 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -4501,7 +4501,9 @@ for rank-2 types.
Impredicative polymorphism
-GHC supports impredicative polymorphism. This means
+GHC supports impredicative polymorphism,
+enabled with .
+This means
that you can call a polymorphic function at a polymorphic type, and
parameterise data structures over polymorphic types. For example:
@@ -5000,9 +5002,13 @@ Type splices are not implemented, and neither are pattern splices or quotations.
- Furthermore, you can only run a function at compile time if it is imported
+ You can only run a function at compile time if it is imported
from another module that is not part of a mutually-recursive group of modules
- that includes the module currently being compiled. For example, when compiling module A,
+ that includes the module currently being compiled. Furthermore, all of the modules of
+ the mutually-recursive group must be reachable by non-SOURCE imports from the module where the
+ splice is to be run.
+
+ For example, when compiling module A,
you can only run Template Haskell functions imported from B if B does not import A (directly or indirectly).
The reason should be clear: to run B we must compile and run A, but we are currently type-checking A.
@@ -6374,14 +6380,14 @@ data T = T {-# UNPACK #-} !(Int,Int)
will store the two Ints directly in the
T constructor, by flattening the pair.
- Multi-level unpacking is also supported:
+ Multi-level unpacking is also supported:
data T = T {-# UNPACK #-} !S
data S = S {-# UNPACK #-} !Int {-# UNPACK #-} !Int
- will store two unboxed Int#s
+ will store two unboxed Int#s
directly in the T constructor. The
unpacker can see through newtypes, too.
@@ -6395,6 +6401,15 @@ data S = S {-# UNPACK #-} !Int {-# UNPACK #-} !Int
constructor field.
+
+ SOURCE pragma
+
+ SOURCE
+ The {-# SOURCE #-} pragma is used only in import declarations,
+ to break a module loop. It is described in detail in .
+
+
+