
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 8/14/10 19:51 , prad wrote:
mkTxt :: (IConnection conn) => conn -> String -> [String] (...) the compiler produces what is to me an incomprehensible rationale for an error:
==== gadit.hs:103:4: Couldn't match expected type `IO String' against inferred type `[String]'
You didn't specify that mkTxt is in IO; your result type is [String], which (given your use of the monad machinery) means you return a String in the List monad. So, "(zzzz :: String) <- (readFile "zzPubs.htm" :: IO String)", but because of the List monad in the result type this means that it's expecting a [String], not an IO String. - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxnS+sACgkQIn7hlCsL25XmGQCgrhMM6vCzRNMH4deG41od7eD3 l9cAn0a+WbwvkAWC7ikG9mFB6ybIjTKa =Voo5 -----END PGP SIGNATURE-----