[Haskell-cafe] howto mix <- within do?
cppljevans at suddenlink.net
Fri Oct 17 08:39:34 EDT 2008
The attached code produces error:
<-- cut here --
runghc -dcore-lint do_with_assignment.proto.hs
Couldn't match expected type `' against inferred type `IO'
Expected type: [t]
Inferred type: IO ()
In the expression: putStr "v0="
In a 'do' expression: putStr "v0="
>-- cut here--
However, similar code here:
apparently does work. Is there some compiler option I
need to use? The compiler is ghc:
The Glorious Glasgow Haskell Compilation System, version 6.8.2
More information about the Haskell-Cafe