[Haskell] Second draft of the Haskell 2010 report available

Simon Marlow marlowsd at gmail.com
Tue Jun 29 11:01:54 EDT 2010


The second draft of the Haskell 2010 report is now available in PDF and 
HTML formats (the PDF looks a lot nicer):

http://www.haskell.org/~simonmar/haskell-2010-draft-report-2.pdf
http://www.haskell.org/~simonmar/haskell-2010-draft-report-2/haskell.html

relative to the first draft, which was only publicised on the 
haskell-prime mailing list, I have now updated the libraries too. 
Rather than update all the library documentation manually, I (perhaps 
rashly) decided to make a LaTeX backend for Haddock instead, and 
generate the report automatically from the library source code.  Getting 
this to work turned out to be a lot more effort than I anticipated, but 
I think the results are quite attractive.  Once the new Haddock backend 
is incorporated upstream, we'll finally have the ability to generate 
decent typeset API documentation.  Furthermore, this should make it much 
easier to incorporate more libraries in future versions of the Haskell 
standard, should we decide to do so.

Right now, the HTML version of the report is generated from the LaTeX 
sources, including the libraries.  We could use the Haddock HTML output 
instead, but that would entail some difficulties with cross-references 
from the language part of the report to the libraries, which is why I've 
left it this way for now.  This is why the libraries part of the report 
is bereft of hyperlinks in HTML; but at least it is well indexed in the 
PDF version.

Summary of the library changes in Haskell 2010 relative to Haskell 98 
and the FFI specification:

  * All libraries have been updated to their hierarchical names

  * The following library modules were dropped from the standard, due to
    being obsolete or superseded.  Replacements are not part of the
    standard yet, but it is expected that they will be replaced in the
    future:

    Directory, System, Time, Locale, CPUTime, Random

    In the case of System, some functions have moved to
    the new modules System.Environment and System.Exit.

  * Foreign.Marshal.Error: functions on IOError moved to System.Error
    (this is where they've been in base for ever).

  * Data.List: added intercalate, subsequences, permutations, foldl',
    foldl1', stripPrefix (H2010 Data.List matches the current base
    version).

  * Data.Char: various additions of Unicode predicates (e.g. isLetter,
    isMark, isNumber), the GeneralCategory type and generalCategory.
    (matches the base version)

  * Control.Monad: added forM, forM_, (>=>), (<=<), forever, foldM_,
    replicateM, replicateM_ (matches the base version).

  * System.IO: added fixIO, hSetFileSize, hTell, hIsTerminalDevice,
    hSetEcho, hGetEcho, hShow.  The base version has various additions:
    hGetBuf/hPutBuf, binary Handles, encodings, and newline support,
    but I erred on the side of being conservative here: these APIs
    need discussion, and in some cases are probably not suitable
    for the standard in their current state at all.

  * System.IO.Error: new module, providing functionality that was
    in Foreign.Marshal.Error in the FFI spec.

  * System.IO.Exit: new module, functionality moved from H98 System
  * System.Environment: new module, functionality moved from H98 System


We expect to provide exactly these libraries in GHC 6.14, although the 
exact mechanism has yet to be decided; for discussion see

http://www.haskell.org/pipermail/haskell-prime/2010-April/003158.html


Comments on the draft report are welcome, before I finalise this and 
sign off on Haskell 2010.

Cheers,
	Simon


More information about the Haskell mailing list