[Haskell-cafe] Categories (cont.)
Chris Smith
cdsmith at gmail.com
Fri Dec 21 20:35:37 CET 2012
It would definitely be nice to be able to work with a partial Category
class, where for example the objects could be constrained to belong to a
class. One could then restrict a Category to a type level representation
of the natural numbers or any other desired set. Kind polymorphism should
make this easy to define, but I still don't have a good feel for whether it
is worth the complexity.
On Dec 21, 2012 6:37 AM, "Tillmann Rendel" <rendel at informatik.uni-marburg.de>
wrote:
> Hi,
>
> Christopher Howard wrote:
>
>> instance Category ...
>>
>
> The Category class is rather restricted:
>
> Restriction 1:
> You cannot choose what the objects of the category are. Instead, the
> objects are always "all Haskell types". You cannot choose anything at all
> about the objects.
>
> Restriction 2:
> You cannot freely choose what the morphisms of the category are. Instead,
> the morphisms are always Haskell values. (To some degree, you can choose
> *which* values you want to use).
>
>
> These restrictions disallow many categories. For example, the category
> where the objects are natural numbers and there is a morphism from m to n
> if m is greater than or equal to n cannot be expressed directly: Natural
> numbers are not Haskell types; and "is bigger than or equal to" is not a
> Haskell value.
>
> Tillmann
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121221/38e8d0da/attachment.htm>
More information about the Haskell-Cafe
mailing list