How to work around GHC bug

Ozgur Akgun ozgurakgun at gmail.com
Wed Mar 14 15:08:38 CET 2012


Hi,

On 14 March 2012 13:51, Volker Wysk <pf3 at volker-wysk.de> wrote:

> import System
>
> main = do
>
> [a] <- getArgs
>
> putStrLn (show a)
>

a here is already of type String. If you don't call show on it, it'll do
the expected thing.

Try:
main = do
[a] <- getArgs
putStrLn a

HTH,
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20120314/ce3e3a2c/attachment.htm>


More information about the Glasgow-haskell-users mailing list