[Haskell-cafe] What is a number. (Was: Num instances for 2-dimensional types)

Miguel Mitrofanov miguelimo38 at yandex.ru
Mon Oct 5 13:24:37 EDT 2009


And I agree that sometimes it can be suitable.

But simply "defining an instance of Num" without a single word on the  
problem one
is trying to solve is not just pointless. It's something that should  
not be done.

On 5 Oct 2009, at 21:06, Lennart Augustsson wrote:

> OK, "just pairs" have no arithmetic, but one way of defining
> arithmetic is to treat the pairs as complex numbers.  Or as mantissa
> and exponent.  Or as something else.  So there's nothing wrong, IMO,
> to make pairs an instance of Num if you so desire.  (Though I'd
> probably introduce a new type.)
>
> On Mon, Oct 5, 2009 at 6:46 PM, Miguel Mitrofanov <miguelimo38 at yandex.ru 
> > wrote:
>>> "Just pairs" have no natural arithmetic upon them.
>>
>> Exactly my point.
>>
>>> BTW. the missing term of M.M. is DUAL NUMBERS.
>>
>> Remembered this already. Thanks anyway.
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list