[EMAIL PROTECTED] wrote:
<snip>
> Use
> 
>   (getStdRandom (randomR (1,6))) :: IO Int 

This much is fine, but...

> instead.
> 
> \begin{code}
> module Main where
> import Random
> 
> 
> main :: IO ()
> main =  do n <- (getStdRandom (randomR (1,6))) :: IO Int
>          ; print n
> \end{code}

Layout error: the semicolon must be indented further than the `n' is.
Furthermore, the semicolon is unnecessary; if it's deleted, yielding

> main :: IO ()
> main =  do n <- (getStdRandom (randomR (1,6))) :: IO Int
>            print n

the code works just fine.

Jon Cast

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to