[Haskell-cafe] [ANN] extended-categories

John Wiegley johnw at newartisans.com
Tue Aug 19 09:40:00 UTC 2014


>>>>> Ian Milligan <ianmllgn at gmail.com> writes:

> extended-categories <github.com/ian-mi/extended-categories> is an
> implementation of categories designed to make use of GHC's recently enriched
> kind system. This project is a work in progress (only a few basic constructs
> are implemented), but your comments are welcomed. extended-categories
> requires a recent version of GHC (I have only tested it with 7.8.3).

> Categories are poly-kinded and have an Object constraint family:

> class Category m where
>     type Object (m :: k -> k -> *) (a :: k) :: Constraint
>     id :: Object m a => m a a
>     (.) :: (Object m a, Object m b, Object m c) => m b c -> m a b -> m a c

Hi Ian,

You should definitely also take a look at Edward Kmett's hask library:

    https://github.com/ekmett/hask

He has taken the idea of poly-kinded Category and run with it in that library.
To compare, he has:

    class Category' (p :: i -> i -> *) where
      type Ob p :: i -> Constraint
      id :: Ob p a => p a a
      observe :: p a b -> Dict (Ob p a, Ob p b)
      (.) :: p b c -> p a b -> p a c

John


More information about the Haskell-Cafe mailing list