[Haskell-cafe] ANN: data-category, restricted categories

Edward Kmett ekmett at gmail.com
Tue Mar 30 17:09:05 EDT 2010


Very true. I oversimplified matters by mistake.

One question, I suppose, is does seq distinguish the arrows, or does it
distinguish the exponential objects in the category? since you are using it
as an object in order to apply seq, and does that distinction matter? I'd
hazard not, but its curious to me.

2010/3/26 David Menendez <dave at zednenem.com>

> On Fri, Mar 26, 2010 at 11:07 AM, Edward Kmett <ekmett at gmail.com> wrote:
> >
> > On Fri, Mar 26, 2010 at 11:04 AM, Edward Kmett <ekmett at gmail.com> wrote:
> >>
> >> -- as long as you're ignoring 'seq'
> >> terminateSeq :: a -> Unit
> >> terminateSeq a = a `seq` unit
> >>
> >
> > Er ignore that language about seq. a `seq` unit is either another bottom
> or
> > undefined, so there remains one canonical morphism even in the presence
> of
> > seq (ignoring unsafePerformIO) =)
>
> It all depends on how you define equality for functions. If you mean
> indistinguishable in contexts which may involve seq, then there are at
> least two values of type Unit -> ().
>
> foo :: (Unit -> ()) -> ()
> foo x = x `seq` ()
>
> foo terminate = ()
> foo undefined = undefined
>
> Even this uses the convention that undefined = error "whatever" =
> loop, which isn't technically true, since you can use exception
> handling to write code which treats them differently.
>
> --
> Dave Menendez <dave at zednenem.com>
> <http://www.eyrie.org/~zednenem/ <http://www.eyrie.org/%7Ezednenem/>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100330/c433c0f7/attachment.html


More information about the Haskell-Cafe mailing list