The problem here is that the "do" construct parses things a bit differently; if you're at the same indentation level, it inserts a (>>) on the assumption that the next line is an independent expression, so you need to indent the "in" a bit more to avoid it.
Note however that this usage is common enough that "do" provides a shorthand: you can simply omit the "in", and "let" will be parsed as if it were a statement:> main = do> gen <- getStdGen> let (randNumber, newGen) = randomR (1,6) gen :: (Int,StdGen)> putStrLn $ "Number is " ++ show randNumber