Thursday, October 27, 2011

Kind polymorphism - a draft

I extended the post on kind polymorphism to Omega, and I'm rather satisfied - I captured 10 different senses of monoids, used level polymorphism and type functions on the way.

sumMonoid      :: Monoid Hask Int                 -- monoid
maybeMonad :: Monoid EndHask Maybe -- monad
envComonad :: Monoid CoEndHask (Env s) -- comonad
haskCat :: Monoid Graph (->) -- category
ixState :: Monoid Indexed IxState -- indexed monad
ixStore :: Monoid CoIndexed IxStore -- indexed comonad
intRing :: Monoid Ab Int -- ring
sumCMonoid :: Monoid Monoids Int -- commutative monoid
complexAlgebra :: Monoid (VSpaces Float) Complex -- R-algebra
EndHask'' :: Monoid' Cats (*0 ~> *0) -- monoidal category

A draft is available here and Omega source code is available here. There are still things that can be improved and researched on.

Also, see a new paper on kind system: Giving Haskell a Promotion.


heisenbug said...

Omega maintainer here...

If you intend to archive/host your paper or omega source code I'd be delighted to give you credentials to check in at

heisenbug said...

Ahh, now I see who you are, feel free to do how you see fit :-)