[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] lawless instances of Functor

Subject: Re: [Haskell-cafe] lawless instances of Functor
From: Dan Piponi
Date: Mon, 4 Jan 2010 16:38:19 -0800
On Mon, Jan 4, 2010 at 4:15 PM, Paul Brauner <[email protected]> wrote:

> I wonder why this isn't some "classic" category theory result (maybe it is ?)

It doesn't hold in category theory in general.

Haskell (or at least a certain subset) is special - many things that
just *look* category theoretical turn out to actually *be* category
theoretical. That's quite a strong statement. So, for example,
functions that have the type signature of a natural transformation are
in fact natural transformations (which tells you non-trivial facts
about the function). And you've found that things that are only
half-defined functors are actually full-blown functors (subject to
someone providing a rigorous proof of this...). This is useful. If
you're using QuickCheck to convince yourself you've implemented a
functor correctly, you only need to test it on id.
Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>