[Haskell-cafe] Num instances for 2-dimensional types

Miguel Mitrofanov miguelimo38 at yandex.ru
Mon Oct 5 09:12:04 EDT 2009



Sönke Hahn wrote:

> I used to implement
> 
>     fromInteger n = (r, r) where r = fromInteger n
> 
> , but thinking about it, 
> 
>     fromInteger n = (fromInteger n, 0)
> 
> seems very reasonable, too. 

Stop pretending something is a number when it's not.


More information about the Haskell-Cafe mailing list