X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=36bb71ce71a03185c8cfb1a3239e899a1ed5e0d8;hb=1f28aaa6116d9cb90966b1bb6cdcbe52fe938867;hp=4475af4bf523653d46d60994578da9bd5b66045c;hpb=500fb9ad138112e8145d9f125f8c6d013f449205;p=ghc-hetmet.git
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 4475af4..36bb71c 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -552,14 +552,11 @@ import qualified Control.Monad.ST.Strict as ST
linkend="search-path"/>.
GHC comes with a large collection of libraries arranged
- hierarchically; see the accompanying library documentation.
- There is an ongoing project to create and maintain a stable set
- of core libraries used by several Haskell
- compilers, and the libraries that GHC comes with represent the
- current status of that project. For more details, see Haskell
- Libraries.
-
+ hierarchically; see the accompanying library
+ documentation. More libraries to install are available
+ from HackageDB.
@@ -2546,7 +2543,7 @@ the context and head of the instance declaration can each consist of arbitrary
following rules:
-For each assertion in the context:
+The Paterson Conditions: for each assertion in the context
No type variable has more occurrences in the assertion than in the headThe assertion has fewer constructors and variables (taken together
@@ -2554,7 +2551,7 @@ For each assertion in the context:
-The coverage condition. For each functional dependency,
+The Coverage Condition. For each functional dependency,
tvsleft->tvsright, of the class,
every type variable in
@@ -2566,11 +2563,15 @@ corresponding type in the instance declaration.
These restrictions ensure that context reduction terminates: each reduction
step makes the problem smaller by at least one
-constructor. For example, the following would make the type checker
-loop if it wasn't excluded:
-
- instance C a => C a where ...
-
+constructor. Both the Paterson Conditions and the Coverage Condition are lifted
+if you give the
+flag ().
+You can find lots of background material about the reason for these
+restrictions in the paper
+Understanding functional dependencies via Constraint Handling Rules.
+
+
For example, these are OK:
instance C Int [a] -- Multiple parameters
@@ -2622,11 +2623,6 @@ something more specific does not:
op = ... -- Default
-You can find lots of background material about the reason for these
-restrictions in the paper
-Understanding functional dependencies via Constraint Handling Rules.
-
@@ -2691,8 +2687,8 @@ makes instance inference go into a loop, because it requires the constraint
Nevertheless, GHC allows you to experiment with more liberal rules. If you use
the experimental flag
-fallow-undecidable-instances
-option, you can use arbitrary
-types in both an instance context and instance head. Termination is ensured by having a
+option, both the Paterson Conditions and the Coverage Condition
+(described in ) are lifted. Termination is ensured by having a
fixed-depth recursion stack. If you exceed the stack depth you get a
sort of backtrace, and the opportunity to increase the stack depth
with N.