Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
A Wander Through GHC's New IO Library

A Wander Through GHC's New IO Library

Ratings: (0)|Views: 1,990 |Likes:
Published by Don Stewart
At the Haskell Implementor's Workshop, Edinburgh, September 5th, 2009, Simon Marlow described the new IO layer for GHC Haskell.

http://haskell.org/haskellwiki/HaskellImplementorsWorkshop

The original document in .pptx form is here: http://www.haskell.org/~simonmar/GHC-IO.pptx

PDF conversion: http://www.galois.com/~dons/talks/simon-marlow-new-io-layer.pdf
At the Haskell Implementor's Workshop, Edinburgh, September 5th, 2009, Simon Marlow described the new IO layer for GHC Haskell.

http://haskell.org/haskellwiki/HaskellImplementorsWorkshop

The original document in .pptx form is here: http://www.haskell.org/~simonmar/GHC-IO.pptx

PDF conversion: http://www.galois.com/~dons/talks/simon-marlow-new-io-layer.pdf

More info:

Published by: Don Stewart on Sep 08, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPTX, PDF, TXT or read online from Scribd
See more
See less

05/11/2014

pdf

text

original

 
A Wander through GHC’sNew IO library
Simon Marlow
 
 The 100-mile view
the API changes:
 –
Unicode
putStr “A légpárnás hajóm tele vanangolnákkal” works! (if your editor is set upright…)
locale-encoding by default, except forHandles in binary mode (openBinaryFile,hSetBinaryMode)
changing the encoding on the fly
 
hSetEncoding :: Handle -> TextEncoding -> IO ()hGetEncoding :: Handle -> IO (Maybe TextEncoding)
data
TextEncodinglatin1, utf8, utf16, utf32, … :: TextEncodingmkTextEncoding :: String -> IO TextEncodinglocaleEncoding :: TextEncoding
 
 The 100-mile view (cont.)
Better newline support
 –
teletypes needed bothCR+LF to start a newline, and we’ve been
hSetNewlineMode :: Handle -> NewlineMode -> IO ()
data
Newline = LF {- “\n” –} | CRLF {- “\r\n” -}nativeNewline :: Newline
data
NewlineMode = NewlineMode {inputNL :: Newline,outputNL :: Newline }noNewlineTranslation = NewlineMode { inputNL = LF, outputNL = LF }universalNewlineMode = NewlineMode { inputNL = CRLF, outputNL =nativeNewline }nativeNewlineMode = NewlineMode { inputNL = nativeNewline,outputNL = nativeNewline }

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->