[Haskell-cafe] Why is type level (+) not commutative?

adam vogt vogt.adam at gmail.com
Thu Nov 27 17:22:45 UTC 2014

Hi Dominic,

On Thu, Nov 27, 2014 at 3:22 AM, Dominic Steinitz <dominic at steinitz.org> wrote:
> Is expressing commutativity not possible?

I think the best we can do is:

type PlusEqv x y xy = ( (x + y) ~ xy, (y + x) ~ xy )

And then use "(n `PlusEqv` q) p" instead of "(n + q) ~ p"


More information about the Haskell-Cafe mailing list