do let in

Damien R. Sullivan dasulliv@cs.indiana.edu
Mon, 3 Mar 2003 22:33:44 -0500


main =
     do
        args <- System.getArgs
        let (m, b) = (read (args!!0), read (args!!1))
        let lim :: Int
            lim = read (args!!2)
            printstate = args!!3
        time1 <- getClockTime
        let n = 2^b
        let afact = array (0,n) ((0,1):[(i,i*afact!(i-1)) | i<-[1..n]]) in
        let (glo, ghi) = gamma_tup lim m b 
        time2 <- getClockTime

gives the Hugs error
ERROR "gamma3_7.hs":141 - Syntax error in expression (unexpected `;', possibly
due to bad layout)

I tried indenting the last two lines, or just the penulatimate line, but no
joy.  I've modified my functions to use afact instead of fact, but I'm hoping
to have it exist as a global for them, rather than modifying all the function
signatures to pass afact down the chain.

Help, please?

-xx- Damien X-)