-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tuesday 11 September 2001 04:06 am, you wrote:
>
> There's a layout error - the statements in the do should be left-aligned:
>
> It's probably caused by different systems having different tab-settings.
>
Hmmm. So, as suspected this layout works we
At 9:44 am -0700 10/9/2001, Hal Daume wrote:
>Simon Marlow wrote:
> > go' f
> > = do h<- openFile f ReadMode
> > text <- hGetContents h
> > let c = head text
> > c `seq` do { hClose h; return c }
>
>This doesn't compile for me. I
| I'm sorry, I had a small error in my code. It should have been:
|
| >go filelist = mapM go' filelist -- no "do return"
| >where go' f = do h <- openFile f ReadMode
| > text <- hGetContents h
| > let c = head $! text
| >
Simon Marlow wrote:
> go' f
> = do h<- openFile f ReadMode
> text <- hGetContents h
> let c = head text
> c `seq` do { hClose h; return c }
This doesn't compile for me. It complains that the last statement in a
'do' construct must be