[Haskell-beginners] Compiler can't deduce Bool as instance of ToField

David McBride toad3k at gmail.com
Thu Aug 15 23:19:16 CEST 2013

The type of 5:

Prelude> :t 5
5 :: Num a => a

That's why it works.  The literal's type uses the type class.  Other fun

Prelude> :t "asdf"
"asdf" :: [Char]

Prelude> :set -XOverloadedStrings

Prelude> :t "asdf"
"asdf" :: Data.String.IsString a => a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130815/bef4de2b/attachment.htm>

More information about the Beginners mailing list