[Haskell-cafe] Pointless functors

Ross Paterson ross at soi.city.ac.uk
Fri Mar 13 12:28:01 EDT 2009


On Sat, Mar 14, 2009 at 02:12:45AM +1000, Matthew Brecknell wrote:
> Ross Paterson wrote: 
> > No.  Choose an arbitrary element shape :: f () and define
> >        point x = fmap (const x) shape
> 
> Interesting. Is the arbitrariness of the shape some sort of evidence
> that Pointed is not really a very useful class in its own right?

Not useless, but equivalent to

  class Functor f => Pointed f where
    unit :: f ()

Naturality of point does the rest.  But not all definitions of unit
are equally useful.


More information about the Haskell-Cafe mailing list