Second draft of the Haskell 2010 report available

2010-06-29 Thread Simon Marlow
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
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Second draft of the Haskell 2010 report available

2010-06-29 Thread malcolm.wallace
In Foreign.C.Error, the table of values of errno causes an unfortunate page break, and it overflows the fresh page as well. (As in, some values are invisible beyond the bottom of the page, rather than flowing onto the next.)Regards,
Malcolm
Comments on the draft report are welcome, before I finalise this and 
sign off on Haskell 2010.

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Second draft of the Haskell 2010 report available

2010-06-29 Thread Malcolm Wallace
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.


Perhaps I should have mentioned (before sending a formatting error  
report): thanks, this looks great!  Auto-generation is definitely the  
way to go, and well worth the effort.


I did notice one other small item, which is perhaps an infelicity  
rather than an error.  The documentation for Data.List (20.10.1), the  
By operations, mentions It is often convenient to use these  
functions together with Data.Function.on.  But sadly, Data.Function  
is not one of the libraries in the H'2010 set.  I would personally be  
happy to add it, but perhaps it is too late, and we will need to wait  
for H'2011.


Regards,
Malcolm

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime