
in 'do' notation, 'let' doesn't take an in. so you want to get rid of the 'in' on the third to last line.
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-) _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe