[Haskell-cafe] Re: [Haskell] specification of sum

Aaron Denney wnoise at ofb.net
Fri Nov 4 16:11:28 EST 2005


On 2005-11-02, ajb at spamcop.net <ajb at spamcop.net> wrote:
> (Moving this to the cafe.)
>
> G'day all.
>
> Quoting Cale Gibbard <cgibbard at gmail.com>:
>
>> We already do rely on them in most cases. Of course, not every
>> property can be proved by the compiler, but many pieces of code are
>> going to assume quite a lot.
>
> Agreed.
>
>> I think that the assumption that (+) and (*) in Num define something
>> like a ring on the given type is a sensible one.
>
> I'm not so certain.  Octonian multiplication, to pick one example, is
> not associative, but I'd like to be able to use (*) nonetheless.

(*) is already defined as being left-associative in H98.  I'm actually
working with non-associative structures at the moment where the
operation is usually considerd "multiplication", but I still wouldn't
want to use (*) for it.  Too much hassle for normal uses.

-- 
Aaron Denney
-><-



More information about the Haskell-Cafe mailing list