X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2F6.6-notes.xml;h=f68d4de337e19a2dff76e9602dd92c0f11577115;hb=985916e235d53246d5a00b91349803f563377904;hp=1f4e48584af1492a03b4d21b4b6e2b5a197e1d0e;hpb=6c6820dba847a1d2da90c67debca0224b1744f93;p=ghc-hetmet.git
diff --git a/docs/users_guide/6.6-notes.xml b/docs/users_guide/6.6-notes.xml
index 1f4e485..f68d4de 100644
--- a/docs/users_guide/6.6-notes.xml
+++ b/docs/users_guide/6.6-notes.xml
@@ -7,6 +7,128 @@
+ GHC now supports SMP:
+ when you compile with , you now get
+ an RTS flag that allows you to specify the
+ number of OS threads that GHC should use. Defaults to 1.
+ See and .
+
+
+
+
+ GHC now handles impredicative polymorphism; see .
+
+
+
+
+ There are significant changes to the way scoped type variables work,
+ and some programs that used to compile may no longer do so.
+ The new story is documented in .
+ ( Simon's e-mail
+ gives some background, but the user manual should be complete (tell
+ us if not), and
+ certainly takes precedence if there is any conflict.)
+
+
+
+
+ GHC now supports bang patterns to require a function is strict
+ in a given argument, e.g.
+
+ f (!x, y) = [x,y]
+ is equivalent to
+
+ f (x, y) | x `seq` False = undefined
+ | otherwise = [x,y]
+ See for more details.
+
+
+
+
+ The restriction that you cannot use two packages together if
+ they contain a module with the same name has been removed.
+ In implementation terms, the package name is now included in
+ every exported symbol name in the object file, so that
+ modules with the same name in different packages do not
+ clash. See .
+
+
+
+
+ GHC now treats source files as UTF-8 (ASCII is a strict
+ subset of UTF-8, so ASCII source files will continue to
+ work as before). However, invalid UTF-8 sequences are
+ ignored in comments, so ASCII code with comments in, for
+ example, Latin-1 will also work.
+
+
+
+ A way to have Latin-1 source files pre-processed by GHC is
+ described in .
+
+
+
+
+ GADTs can now use record syntax. Also, if the datatype could
+ have been declared with Haskell 98 syntax then deriving
+ clauses are permitted. For more info see .
+
+
+
+
+ There is a new pragma LANGUAGE which allows
+ extensions to be specified portably, i.e. without having to
+ resort to the OPTIONS_GHC pragma and giving
+ GHC-specific options. The arguments to the pragma are the same
+ extensions that Cabal knows about. More info in
+ .
+
+
+
+
+ When you use ghc --make, GHC will now take
+ the executable filename from the name of the file containing
+ the Main module rather than using
+ a.out. The .exe
+ extension is appended on Windows, and it can of course be
+ overridden with .
+
+
+
+
+ GHC's garbage collector now deals more intelligently with
+ mutable data, so you mostly no longer need to worry about GC
+ performance when a lot of memory is taken up by
+ STArrays, IOArrays,
+ STRefs or IORefs.
+ For more details see
+ trac bug #650.
+
+
+
+
+ GHC now allows more generalisation when typing mutually
+ recursive bindings, resulting in more programs being accepted.
+ See for more details.
+
+
+
+
+ The rules for instance declarations have been further relaxed.
+ You are now permitted to have instances whose heads contain
+ only type variables, e.g.
+
+ instance C a
+ and instances whose constraints are not only type variables,
+ e.g.
+
+ instance C2 Int a => C3 [a] b
+ For more details, see .
+
+
+
+
The following flags (and, where appropriate, their inverses)
used to be static (can only be given on
the command line) but are now dynamic (can also be given in
@@ -49,7 +171,6 @@
,
,
,
- ,
,
,
,
@@ -70,6 +191,16 @@
+ The
+
+ option is now called
+ .
+ (the old name is still accepted for backwards compatibility,
+ but will be removed in the future).
+
+
+
+
The
flag has been removed.
@@ -91,8 +222,9 @@
- The equality test performed when pattern matching against
- an overloaded numeric literal now uses the
+ When the is given,
+ the equality test performed when pattern matching against an
+ overloaded numeric literal now uses the
(==) in scope, rather than the one from
Prelude. Likewise, the subtraction and
inequality test performed when pattern matching against
@@ -102,34 +234,11 @@
- With the exception of the arrow syntax, the types of functions
- used by sugar (such as do notation, numeric literal patterns)
- need not match the types of the Prelude
- functions normally used.
-
-
-
-
- GADTs can now use record syntax. Also, if the datatype could
- have been declared with Haskell 98 syntax then deriving
- clauses are permitted. For more info see .
-
-
-
-
- There is a new pragma LANGUAGE which allows
- extensions to be specified portably, i.e. without having to
- resort to the OPTIONS_GHC pragma and giving
- GHC-specific options. The arguments to the pragma are the same
- extensions that Cabal knows about. More info in
- .
-
-
-
-
- GHC now allows more generalisation when typing mutually
- recursive bindings, resulting in more programs being accepted.
- See for more details.
+ Another change to :
+ with the exception of the arrow syntax, the types of
+ functions used by sugar (such as do notation, numeric
+ literal patterns) need not match the types of the
+ Prelude functions normally used.
@@ -151,25 +260,6 @@
- GHC now treats source files as UTF-8 (ASCII is a strict
- subset of UTF-8, so ASCII source files will continue to
- work as before). However, invalid UTF-8 sequences are
- ignored in comments, so ASCII code with comments in, for
- example, Latin-1 will also work.
-
-
-
-
- When you use ghc --make, GHC will now take
- the executable filename from the name of the file containing
- the Main module rather than using
- a.out. The .exe
- extension is appended on Windows, and it can of course be
- overridden with .
-
-
-
-
If you newtype the IO monad, e.g.
newtype MyIO a = MyIO (IO a)
@@ -177,8 +267,14 @@
MyIO t
rather than just
IO t.
+ See
+ GHC's mechansim for deriving user-defined classes
+ for newtypes has been further generalised, to multi-parameter type
+ classes and higher-kinded types. See .
+
By default, pattern bindings in GHC are now monomorphic.
@@ -208,108 +304,110 @@
- It is now possible, with the -I RTS flag,
- to control the amount of idle time that happens before a major
- GC is performed.
+ Linear implicit parameters have been scheduled for removal for some
+ time. In 6.6 we've removed them from the user manual, and they may
+ well disappear from the compiler itself in 6.6.1.
- GHC now includes the package name in symbol names; the upshot
- of this is that it is possible to link a program that uses
- multiple packages each containing a module of the same name.
+ If the program is idle for a certain amount of time then GHC
+ will now take the opportunity to do a major garbage collection.
+ The amount of idle time that is required before that happens
+ is controlled by the new -I RTS flag.
+ There is more detail in .
- GHCi now has a :main command that allows
- you to call the main function with
- command-line arguments.
- See for more information.
+ It is now possible to control the frequency that the RTS clock
+ ticks at with the new -V RTS flag. This is
+ normally handled automatically by other flags, but this flag
+ is needed if you want to increase the resolution of the time
+ profiler.
+ For more details see .
- GHCi now has :ctags and
- :etags commands to generate tags files for
- vi-style and emacs-style editors respectively.
- See for more information.
+ The old syntax for FFI declarations (deprecated since 5.04)
+ is no longer accepted.
- The rules for instance declarations have been further relaxed.
- You are now permitted to have instances whose heads contain
- only type variables, e.g.
-
- instance C a
- and instances whose constraints are not only type variables,
- e.g.
-
- instance C2 Int a => C3 [a] b
- For more details, see .
+ The flag, which when used to compile
+ libraries means executables using the library will be smaller,
+ can now be used with and hence
+ can be used by cabal.
+ See for more information.
- GHCi now allows tab completion of in-scope names.
+ Template Haskell used to have limited support for type signatures in
+ patterns, but since that design is in flux for Haskell (let alone
+ Template Haskell), we've removed type signatures in patterns from
+ Template Haskell.
- The old syntax for FFI declarations (deprecated since 5.04)
- is no longer accepted.
+ GHC now supports postfix operators, as a simple generalisation of
+ left sections ().
- The flag can now be used with
- , and hence can be used by cabal.
+ Parallel arrays, as enabled by -fparr, no
+ longer work. They'll be coming back shortly, in full glory.
+
+
+
+
+ GHCi changes
+
+
- GHC now supports bang patterns to require a function is strict
- in a given argument, e.g.
-
- f (!x, y) = [x,y]
- is equivalent to
-
- f (x, y) | x `seq` False = undefined
- | otherwise = [x,y]
+ GHCi now allows tab completion of in-scope names and modules
+ on platforms that use readline (i.e. not Windows).
- GHC now handles impredicative polymorphism; see
- Simon's e-mail
- for more details.
+ GHCi now has a :main command that allows
+ you to call the main function with
+ command-line arguments.
+ See for more information.
- GHC's modules are now also bundled into a
- ghc package, allowing programs to make use
- of GHC as a library. The interface has not yet been properly
- designed, so is subject to change.
+ GHCi now has :ctags and
+ :etags commands to generate tags files for
+ vi-style and emacs-style editors respectively.
+ See for more information.
- GHC's garbage collector now deals more intelligently with
- mutable data, so you no longer need to worry about GC
- performance when a lot of memory is taken up by
- STArrays, IOArrays,
- STRefs or IORefs.
+ GHCi now has an :edit command which pops
+ up an editor on the most recently loaded file, or a
+ specified file. See for
+ more information.
- GHC now supports SMP:
- when you compile with , you now get
- an RTS flag that allows you to specify the
- number of OS threads that GHC should use. Defaults to 1.
-
+ GHCi now invokes print by default on the
+ result of IO actions and bindings at the prompt. This is
+ occasionally not what you want, so it can be disabled (at
+ least for bindings) with
+ :set -fno-print-bind-result. See .
@@ -336,7 +434,7 @@
- Version number 2.0 (was 1.0).
+ Version number 2.1 (was 1.0).
@@ -431,13 +529,16 @@
inline which, provided the RHS is visible
to the compiler, forcibly inlines its argument.
Otherwise, it acts like id.
+ For more details, see .
GHC.Exts now provides a function
- lazy which forces GHC to think that its
- argument is lazy in its first argument.
+ lazy, where lazy f
+ behaves like f, except GHC is forced
+ to believe that it is lazy in its first argument.
+ For more details, see .
@@ -724,7 +825,7 @@
- Version number 1.1.5 (was 1.1.4).
+ Version number 1.1.6 (was 1.1.4).
@@ -747,24 +848,6 @@
- Added cabal-setup, a user interface to
- building and installing Cabal packages.
-
-
-
-
- Added cabal-install, an automated
- installer for cabal packages.
-
-
-
-
- There is now a Network.Hackage hierarchy
- for code needed by hackage, the package server.
-
-
-
-
There are now modules
Distribution.Simple.compiler
for each of GHC, NHC,
@@ -922,7 +1005,7 @@
- Version number 2.0 (was 1.0).
+ Version number 2.1 (was 1.0).
@@ -943,14 +1026,6 @@
- There is a new module
- Control.Sequential.STM for non-concurrent
- transactions which nevertheless need to be atomic in the
- face of exceptions.
-
-
-
-
A new module
Control.Concurrent.STM.TArray defines
TArray, a transactional array, and makes
@@ -1036,7 +1111,7 @@
- Version number 2.0 (was 1.0).
+ Version number 2.1 (was 1.0).
@@ -1124,23 +1199,6 @@
and System.Win32.Console.
-
-
- System.Win32 no longer exports
- LCID,
- LANGID,
- SortID,
- SubLANGID,
- PrimaryLANGID,
- mAKELCID,
- lANGIDFROMLCID,
- sORTIDFROMLCID,
- mAKELANGID,
- pRIMARYLANGID or
- sUBLANGID from
- System.Win32.NLS.
-
-
@@ -1180,7 +1238,7 @@
- Version number remains 0.1.
+ Version number 0.2 (was 0.1).
@@ -1208,6 +1266,14 @@
network package.
+
+
+ The Network.CGI.Compat module provides
+ a similar interface to the old Network.CGI
+ module, but it uses Text.XHtml rather than
+ Text.Html.
+
+
@@ -1290,95 +1356,6 @@
- HaXml
-
-
-
- Version number 1.16 (was 1.12.1).
-
-
-
-
- There are now lazy versions of the parsing modules
- Text.XML.HaXml.ParseLazy
- (a lazy non-validating XML parser) and
- Text.XML.HaXml.Html.ParseLazy
- (a lazy HTML parser).
-
-
-
-
- There are lazy versions of two of the example tools,
- CanonicaliseLazy and
- XtractLazy.
-
-
-
-
- Text.XML.HaXml.Haskell2Xml and
- Text.XML.HaXml.Xml2Haskell have been
- removed, with Text.XML.HaXml.XmlContent
- replacing them.
- You must now use {-! derive : XmlContent !-}
- rather than {-! derive :Haskell2Xml !-}
- to have instances derived for your classes.
-
-
-
-
- Now also provides the
- Text.ParserCombinators.HuttonMeijer
- monadic parser combinator library.
-
-
-
-
- Provides another new set of parser combinators, as well as a lazy
- variant, a variant that carries around state, and a
- variant that does both. The modules are
- Text.ParserCombinators.Poly,
- Text.ParserCombinators.PolyLazy,
- Text.ParserCombinators.PolyState and
- Text.ParserCombinators.PolyStateLazy
- respectively.
- It also provides
- Text.ParserCombinators.TextParser, which
- is the Poly parser combinators
- specialised for strings.
-
-
-
-
- Now provides a SAX-like parser in
- Text.XML.HaXml.SAX.
-
-
-
-
- Now provides a module
- Text.XML.HaXml.TypeMapping, which
- defines an explicit representation for Haskell types.
- This allows generation of a DTD from a Haskell value.
-
-
-
-
- The Posn type has been pulled out from
- Text.XML.HaXml.Lex into its own module
- Text.XML.HaXml.Posn. Some helper
- functions are also exported.
-
-
-
-
- The APIs to the pre-existing modules have also substantially
- changed.
-
-
-
-
-
- HGL
@@ -1426,187 +1403,6 @@
- Japi
-
-
-
- No change.
-
-
-
-
-
-
- monads
-
-
-
- Version number 2.0.1 (was 1.1).
-
-
-
-
- In Monad.Id, run has
- been renamed runId.
-
-
-
-
- The Monad.BackT module has been removed;
- use the new Monad.SearchT module instead.
-
-
-
-
- There is a new module Monad.ForEach
- containing a class ForEach, for
- applying a monadic function to each element in a container.
- It provides instances for [] and
- Maybe.
-
-
-
-
- The following combinators have been moved from
- Monad.Prelude to a new module
- Monad.Combinators:
- (@@),
- (#),
- (<#),
- (<##),
- concatMap and
- partitionM.
- Monad.Combinators also defines the
- following new combinators:
- ifM,
- whenM,
- andM,
- orM,
- allM,
- anyM,
- forEach2,
- forEach2_,
- forEach3 and
- forEach3_, and re-exports
- Control.Monad.
-
-
-
-
- The modules
- Monad.Cont,
- Monad.Except,
- Monad.Reader,
- Monad.State and
- Monad.Writer have been removed, but their
- monad transformer counterparts remain. If you want the
- monads then just transform the identity monad instead.
-
-
-
-
- The Monad.ExceptT module now also exports
- runExceptWith and unsafeRunExcept. It also now defines an
- instance ContM (ExceptT x m).
-
-
-
-
- In Monad.Prelude, the
- get method of the
- ReaderM module has been renamed
- getR. The local method
- has been removed with a new class
- ReadUpdM, with methods
- updateR
- and setR, taking its place.
- The letLocal function has also been removed.
-
-
-
-
- In Monad.Prelude,
- update has been made a method of
- StateM.
- The
- peek and poke methods
- have been renamed get and
- set respectively, and both have a default
- definition in terms of update.
- The poke_ function has also been renamed
- set_.
-
-
-
-
- In Monad.Prelude,
- handle has been taken out of the
- ExceptM class and put into a new
- class HandlerM along with a new method
- checkExcept.
- There are also new functions withHandler
- and handle_.
-
-
-
-
- The TakeWriterM class has been renamed
- CollectorM, and rather than a single
- method takeFrom it has methods
- censor and collect
- with default definitions in terms of each other.
-
-
-
-
- Monad.Prelude defines a type
- Cont and functions
- returnCC and cJump.
-
-
-
-
- Monad.Prelude exports functions
- inReader,
- inWriter,
- inState and
- inExcept.
- These make it easy to turn a pure representation of an
- effectful computation into an actual computation.
-
-
-
-
- The zipWith3M and
- zipWith3M_ functions have been removed
- from Monad.Prelude.
-
-
-
-
- Monad.Prelude now re-exports
- Monad.Combinators and
- Monad.ForEach, but no longer re-exports
- Monad.
-
-
-
-
- There is a new module Monad.Transformers
- which re-exports
- Monad.Id,
- Monad.ReaderT,
- Monad.WriterT,
- Monad.StateT,
- Monad.ExceptT,
- Monad.SearchT and
- Monad.ContT.
-
-
-
-
-
- mtl
@@ -1761,7 +1557,7 @@
- Version number remains 1.1.
+ Version number 1.2 (was 1.1).
@@ -1871,6 +1667,24 @@
+ GHC As A Library
+
+ Version number 6.6.
+
+
+ The internal modules of GHC are now available as a library, package
+ name ghc.
+ The interface has not been designed with use by other programs
+ in mind, so expect the API to vary radically in future
+ releases.
+
+
+ An introduction to using the library can be found
+ on the wiki.
+
+
+
+ Internal changes