[Haskell-cafe] Composition Operator
Stefan O'Rear
stefanor at cox.net
Mon Sep 24 22:01:29 EDT 2007
On Mon, Sep 24, 2007 at 06:47:05PM -0700, Dan Weston wrote:
> Of course I should have proofread this one more time!
>
>> What is a point? A point in Hask* is a type with only a single value in
>> it, from which all other values can be constructed. Every value x maps
>> trivially into a function (const x), and when you apply this function to
>> the (only) value of a point, you get x back. There is a built-in Haskell
>> type () whose only value [besides undefined] is also called (), so we
>> might as well take the type () as our point:
>
> Actually, a point is any one object, for Hask* it is any one monotype (e.g.
> (), [Int], (Char,Double)). The magic of an *initial* object (i.e. a type
> with only one nullary constructor such as () that has only one (defined)
> value) is that there is a *unique* function mapping it to any other type.
> But that's being greedy, since we don't need a unique function, just any
> one function. A forgetful function like const doesn't care which type its
> second argument is.
() isn't an initial object.
There are no initial objects in Hask-with-⊥, since every object admits
at least four arrows to Bool (const True, const False, const undefined,
and undefined).
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070924/3359daee/attachment.bin
More information about the Haskell-Cafe
mailing list