[Haskell-cafe] Re: Numeric type classes

Jacques Carette carette at mcmaster.ca
Tue Sep 12 13:31:16 EDT 2006


First, as already pointed out in
http://www.haskell.org/pipermail/haskell-cafe/2006-April/015404.html
there is a lot of relevant previous work in this area.

Aaron Denney wrote:
> I know of no good way to express that a given data type obeys the
> same interface two (or more) ways.  Some OO languages try to handle the
> case of of an abstract base class being inherited twice through two
> different intermediate classes, but none of them do it well.
>   
This is very easy to do in 'raw' category theory, as concepts are not 
_nominal_, so a functor from one type to another can explicitly do a 
renaming if necessary.  Various algebraic specification languages have 
thus adopted this too, so that you are not forced to give unique names 
to all your concepts, you can in fact give them meaningful names 'in 
context', and use a remapping when you want to say that you obey a 
particular interface.

This is an old conversation, see
http://www.haskell.org/pipermail/haskell/2005-October/016621.html
for example.

Jacques


More information about the Haskell-Cafe mailing list