[Haskell-cafe] New to Haskell - Question about hugsIORun from old Prelude

Henning Thielemann lemming at henning-thielemann.de
Tue Dec 12 08:29:37 EST 2006


On Mon, 11 Dec 2006, Rahul Naik wrote:

> Hello,
> 
> I am trying to rewrite some older (2001) haskell :
> 
> myReadFile :: String -> String
> myReadFile f = case hugsIORun (readFile f) of
>                 Right s -> s
>         Left _ -> ""
> 
> Can someone provide me with a up to date version of the above
> bit of code without using code from the old Prelude?

http://www.haskell.org/hawiki/ThatAnnoyingIoType


More information about the Haskell-Cafe mailing list