X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=172d6ff3518ea73b52e13195f2876ca5fbe77df7;hp=dab683a429e880186e4225b6dc3ee0462b92bdd9;hb=46809fa91667e952afe016e4cd704b21274241b4;hpb=b56d78783390e922c4bc8106f04729de01749e01 diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index dab683a..172d6ff 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -3,8 +3,9 @@ language, GHC extensions, GHC As with all known Haskell systems, GHC implements some extensions to -the language. They are all enabled by options; by default GHC -understands only plain Haskell 98. +the language. They can all be enabled or disabled by commandline flags +or language pragmas. By default GHC understands the most recent Haskell +version it supports, plus a handful of extensions. @@ -39,8 +40,7 @@ documentation describes all the libraries that come with GHC. The language option flags control what variation of the language are - permitted. Leaving out all of them gives you standard Haskell - 98. + permitted. Language options can be controlled in two ways: @@ -439,10 +439,10 @@ Indeed, the bindings can even be recursive. 'x'# has type Char# "foo"# has type Addr# 3# has type Int#. In general, - any Haskell 98 integer lexeme followed by a # is an Int# literal, e.g. + any Haskell integer lexeme followed by a # is an Int# literal, e.g. -0x3A# as well as 32#. 3## has type Word#. In general, - any non-negative Haskell 98 integer lexeme followed by ## + any non-negative Haskell integer lexeme followed by ## is a Word#. 3.2# has type Float#. 3.2## has type Double# @@ -460,11 +460,11 @@ Indeed, the bindings can even be recursive. option. In the new syntax, the prefix form of a qualified operator is written module.(symbol) - (in Haskell 98 this would + (without NewQualifiedOperators this would be (module.symbol)), and the infix form is written `module.(symbol)` - (in Haskell 98 this would + (without NewQualifiedOperators this would be `module.symbol`. For example: @@ -476,13 +476,13 @@ Indeed, the bindings can even be recursive. like Prelude... For example, when NewQualifiedOperators is on, it is possible to write the enumerated sequence [Monday..] - without spaces, whereas in Haskell 98 this would be a + without spaces, whereas without NewQualifiedOperators this would be a reference to the operator ‘.‘ from module Monday. - When is on, the old Haskell - 98 syntax for qualified operators is not accepted, so this - option may cause existing Haskell 98 code to break. + When is on, the old + syntax for qualified operators is not accepted, so this + option may cause existing code to break.