From: simonmar Date: Thu, 11 Sep 2003 14:34:25 +0000 (+0000) Subject: [project @ 2003-09-11 14:34:24 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~465 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a7e3ac4ebde3e4f323a4147730132c609b035735;p=ghc-hetmet.git [project @ 2003-09-11 14:34:24 by simonmar] Document -fth and -fimplicit-params --- diff --git a/ghc/docs/users_guide/flags.sgml b/ghc/docs/users_guide/flags.sgml index f143588..3f1f1b0 100644 --- a/ghc/docs/users_guide/flags.sgml +++ b/ghc/docs/users_guide/flags.sgml @@ -433,27 +433,27 @@ - + Enable overlapping instances dynamic - - Enable undecidable instances + + Enable arrow notation extension dynamic - + - - Enable generics + + Enable undecidable instances dynamic - + - - Enable most language extensions + n + set the limit for context reduction dynamic - + or @@ -463,16 +463,16 @@ - - Enable arrow notation extension + + Enable generics dynamic - + - - Enable deprecated with keyword + + Enable most language extensions dynamic - + @@ -481,6 +481,18 @@ + + Enable Implicit Parameters + dynamic + + + + + Make tuple pattern matching irrefutable + dynamic + + + Don't implicitly import Prelude dynamic @@ -493,16 +505,16 @@ - - Make tuple pattern matching irrefutable + + Enable Template Haskell dynamic - + - n - set the limit for context reduction + + Enable deprecated with keyword dynamic - + diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index 4602650..ff113aa 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -127,34 +127,51 @@ with GHC. - - - - -fno-implicit-prelude - option GHC normally imports - Prelude.hi files for you. If you'd - rather it didn't, then give it a - option. The idea - is that you can then import a Prelude of your own. (But - don't call it Prelude; the Haskell - module namespace is flat, and you must not conflict with - any Prelude module.) - - Even though you have not imported the Prelude, most of - the built-in syntax still refers to the built-in Haskell - Prelude types and values, as specified by the Haskell - Report. For example, the type [Int] - still means Prelude.[] Int; tuples - continue to refer to the standard Prelude tuples; the - translation for list comprehensions continues to use - Prelude.map etc. - - However, does - change the handling of certain built-in syntax: see - . + + + + -fno-implicit-prelude + option GHC normally imports + Prelude.hi files for you. If you'd + rather it didn't, then give it a + option. The idea is + that you can then import a Prelude of your own. (But don't + call it Prelude; the Haskell module + namespace is flat, and you must not conflict with any + Prelude module.) + + Even though you have not imported the Prelude, most of + the built-in syntax still refers to the built-in Haskell + Prelude types and values, as specified by the Haskell + Report. For example, the type [Int] + still means Prelude.[] Int; tuples + continue to refer to the standard Prelude tuples; the + translation for list comprehensions continues to use + Prelude.map etc. + + However, does + change the handling of certain built-in syntax: see . + + - - + + + + Enables Template Haskell (see ). Currently also implied by + . + + + + + + + Enables implicit parameters (see ). Currently also implied by + . + + @@ -1833,7 +1850,13 @@ J Lewis, MB Shields, E Meijer, J Launchbury, 27th ACM Symposium on Principles of Programming Languages (POPL'00), Boston, Jan 2000. -(Most of the following, stil rather incomplete, documentation is due to Jeff Lewis.) + +(Most of the following, stil rather incomplete, documentation is +due to Jeff Lewis.) + +Implicit parameter support is enabled with the option +. + A variable is called dynamically bound when it is bound by the calling context of a function and statically bound when bound by the callee's @@ -3174,10 +3197,16 @@ The documentation here describes the realisation in GHC. (It's rather sketchy j Tim Sheard is going to expand it.) - Syntax - - Template Haskell has the following new syntactic constructions. You need to use the flag - -fglasgow-exts to switch these syntactic extensions on. + + Syntax + + Template Haskell has the following new syntactic + constructions. You need to use the flag + + to switch these syntactic extensions on + ( is currently implied by + , but you are encouraged to + specify it explicitly). @@ -3224,7 +3253,6 @@ Tim Sheard is going to expand it.) - Using Template Haskell @@ -3310,14 +3338,13 @@ pr :: String -> Expr pr s = gen (parse s) -Now run the compiler (here we are using a "stage three" build of GHC, at a Cygwin prompt on Windows): +Now run the compiler (here we are a Cygwin prompt on Windows): -ghc/compiler/stage3/ghc-inplace --make -fglasgow-exts -package haskell-src main.hs -o main.exe +$ ghc --make -fth main.hs -o main.exe -Run "main.exe" and here is your output: - +Run "main.exe" and here is your output: $ ./main