[Haskell-cafe] Those damned parentheses
Brandon S Allbery KF8NH
allbery.b at gmail.com
Sat May 7 21:19:05 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 5/7/11 15:10 , Eitan Goldshtrom wrote:
> I get the error "Couldn't match expected type `[Char]' with actual type `a0
> -> c0'". The only way it seems to work is
> f p = putStrLn $ (show (Main.id p)) ++ " - message received"
Interestingly enough, you have the correct answer in there as well: "$"
> f p = putStrLn $ (show $ Main.id p) ++ " = message received"
You may also want to look into Control.Applicative.
brandon s. allbery [linux,solaris,freebsd,perl] allbery.b at gmail.com
system administrator [openafs,heimdal,too many hats] kf8nh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe