[Haskell-cafe] Re: Re: nested maybes

Mikael Johansson mikael at johanssons.org
Wed Feb 7 16:37:28 EST 2007


On Wed, 7 Feb 2007, Dan Weston wrote:
>>  A way to categorify elements of objects in a cartesian closed category
>>  (such as that that sufficiently restricted Haskell takes place in) are
>>  to view entities of type A as maps () -> A.Mikael Johansson wrote:
>
> This rather inconveniently clashes with the fact that A and () -> A are two 
> distinct types in Haskell. A is just the "curried" counterpart to () 
> ->  A, just as A -> B is the curried counterpart to OneTuple A -> B and A B 
> ->  -> C is the (fully) curried counterpart to (A,B) -> C
>
> I take it by your argument that curried and uncurried functions, being 
> isomorphic, are represented by the same object in your category?
>

They probably would be -- which'd end up displaying the category (and thus 
the way I think about Haskell) as a quotient category of the Haskell98 
category.

I think though, still, that my argument carries content to the discussion: 
regardless of whether we handle currying or not (note that any function 
has a completely curried normal form) we still end up with the original 
argument separating things that doesn't necessarily make sense to separate 
-- in the argument 0-ary functions from n-ary functions.

> Dan
>
>

-- 
Mikael Johansson                 | To see the world in a grain of sand
mikael at johanssons.org            |  And heaven in a wild flower
http://www.mikael.johanssons.org | To hold infinity in the palm of your hand
                                  |  And eternity for an hour


More information about the Haskell-Cafe mailing list