[Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

satvik chauhan mystic.satvik at gmail.com
Thu Dec 27 18:18:27 CET 2012


I don't know about the RebindableSyntax extension.  But

Prelude> :t [[1,2],3]
[[1,2],3] :: (Num [t], Num t) => [[t]]

The above only says that is is possible to have a list like [[1,2],3] if
you have for a Num t, [t] is also an instance of Num. But it doesn't
guarantee the existence of such an instance. When you actually execute the
code then you see that no such instance exists by default.

-Satvik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121227/4c44c40b/attachment.htm>


More information about the Haskell-Cafe mailing list