[Haskell-cafe] CCC MyType

Brent Yorgey byorgey at seas.upenn.edu
Thu Sep 30 22:54:15 EDT 2010


On Wed, Sep 22, 2010 at 04:57:42PM +0200, Lafras Uys wrote:
> 
> > data MyType a b = MyType {f::(a -> b)}
> > data SomeType a b = SomeType {g::(a,b)}
> 
> > instance (Symmetric MyType (Product MyType),
> >           Monoidal MyType (Product MyType),
> >           PreCartesian MyType) => CCC MyType where
> 
> >   type Exp MyType = SomeType

This doesn't seem right to me.  I would expect

  type Exp MyType = MyType

and 

  type Product MyType = SomeType

since the exponential objects corresponding to functions are
precisely function types.

-Brent


More information about the Haskell-Cafe mailing list