[Haskell-cafe] Extending the idea of a general Num to other types?

Peter Verswyvelen bf3 at telenet.be
Sun Sep 2 15:16:12 EDT 2007

Snif, this is sad...  :-(   Oh well, maybe this gets improved in Haskell 
Prime  ;-)

Lennart Augustsson wrote:
> You're right.  The list syntax is only for lists in Haskell.  It would 
> be nice if the list syntax was overloaded too.
> You can overload numeric literals (by defining fromInteger) and string 
> literals (by defining fromString, in 6.7).
> BTW, the [1..10] syntax is overloaded, you need an Enum instance.

More information about the Haskell-Cafe mailing list