[Haskell-cafe] Restricted type classes
jwlato at gmail.com
Tue Sep 7 07:14:03 EDT 2010
> From: Stephen Tetley <stephen.tetley at gmail.com>
> On 6 September 2010 20:18, John Lato <jwlato at gmail.com> wrote:
> > Can you give an example of a Functor that doesn't have pure? I think
> > Pointed Functors which are useful; not Functor by itself.
> Strictly speaking is Pair one? The current implementation tacks on monoid.
Interesting example. I tend not to like implementations which rely on
bottoms, so I think I'd agree.
In a similar spirit, I would propose Data.Vector.Unboxed.Vector as a Pointed
Functor (modulo element restrictions) which is not Applicative, since the
necessary element restrictions mean <*> can't be defined.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe