X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fglasgow_exts.xml;h=36958c9b04a883881b951c360236eb179fcd6cfb;hb=315c25ab86177f85f8c316f79a789675b792f6bd;hp=241245143d057f6c85697162c9972d67912daea7;hpb=07291441614c93357b813f7d4d007e9c32636582;p=ghc-hetmet.git
diff --git a/ghc/docs/users_guide/glasgow_exts.xml b/ghc/docs/users_guide/glasgow_exts.xml
index 2412451..36958c9 100644
--- a/ghc/docs/users_guide/glasgow_exts.xml
+++ b/ghc/docs/users_guide/glasgow_exts.xml
@@ -835,26 +835,38 @@ This name is not supported by GHC.
return, are in scope (not the Prelude
versions). List comprehensions, and parallel array
comprehensions, are unaffected.
+
+
+ Similarly recursive do notation (see
+ ) uses whatever
+ mfix function is in scope, and arrow
+ notation (see )
+ uses whatever arr,
+ (>>>), first,
+ app, (|||) and
+ loop functions are in scope.
+
- Be warned: this is an experimental facility, with fewer checks than
- usual. In particular, it is essential that the functions GHC finds in scope
- must have the appropriate types, namely:
+ The functions with these names that GHC finds in scope
+ must have types matching those of the originals, namely:
- fromInteger :: forall a. (...) => Integer -> a
- fromRational :: forall a. (...) => Rational -> a
- negate :: forall a. (...) => a -> a
- (-) :: forall a. (...) => a -> a -> a
- (>>=) :: forall m a. (...) => m a -> (a -> m b) -> m b
- (>>) :: forall m a. (...) => m a -> m b -> m b
- return :: forall m a. (...) => a -> m a
- fail :: forall m a. (...) => String -> m a
+ fromInteger :: Integer -> N
+ fromRational :: Rational -> N
+ negate :: N -> N
+ (-) :: N -> N -> N
+ (>>=) :: forall a b. M a -> (a -> M b) -> M b
+ (>>) :: forall a b. M a -> M b -> M b
+ return :: forall a. a -> M a
+ fail :: forall a. String -> M a
- (The (...) part can be any context including the empty context; that part
- is up to you.)
- If the functions don't have the right type, very peculiar things may
- happen. Use -dcore-lint to
- typecheck the desugared program. If Core Lint is happy you should be all right.
+ (Here N may be any type,
+ and M any type constructor.)
+
+ Be warned: this is an experimental facility, with
+ fewer checks than usual. Use -dcore-lint
+ to typecheck the desugared program. If Core Lint is happy
+ you should be all right.