[Haskell-cafe] CCC MyType

Brent Yorgey byorgey at seas.upenn.edu
Mon Oct 4 16:29:04 EDT 2010

On Mon, Oct 04, 2010 at 08:24:33AM +0200, Lafras Uys wrote:
> Hash: SHA1
> On 02/10/2010 23:35, Brent Yorgey wrote:
> > On Fri, Oct 01, 2010 at 01:18:29PM +0200, Lafras Uys wrote:
> >> Hash: SHA1
> >>
> >> I can now find explicit bindings for apply and curry, however not for
> >> uncurry. The type signature for uncurry introduces a new type
> >> constructor (<=>),
> >>
> >>> uncurry :: <= a (Exp <= b c) -> <= (Product <=> a b) c
> >>
> >> I'm not sure what the meaning of (<=>) is? If someone could provide some
> >> pointers, I would be much obliged.
> > 
> > Where did you get these type signatures from?  It seems most likely to
> > me that the <=> is just a typo.
> - From the categories package,
> http://hackage.haskell.org/package/categories

Aha, you're right, it does have (<=>) there, doesn't it?  It's
definitely a typo.  The reason it compiles at all is that (<=>) is
just treated as a universally quanitified type variable.  But this
means it's going to be very difficult to implement uncurry, since you
have to yield an arrow from the product of a and b in ANY category, to
c.  Not only is it impossible to implement, it doesn't even make
sense. =)  I sent a message to edwardk telling him of the error.  In
the meantime if you still want to play with this class in the
categories package, you can get the source code with

  cabal unpack categories

then edit the code yourself and recompile/install with

  cabal install

in the root of the categories-0.54.1 directory.


More information about the Haskell-Cafe mailing list