[Haskell-cafe] Restricted type classes

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Sep 5 08:47:30 EDT 2010

On 5 September 2010 22:40, John Lato <jwlato at gmail.com> wrote:
> Having Pointed is categorically the right thing to do, which is why I argue
> for its inclusion.  Also, I think it would be prudent to avoid a situation
> with the possibility of turning into a rehash of the
> Functor/Applicative/Monad mess.
> Are there any good reasons for not including it?  Just because we don't have
> a use now doesn't mean it might not be useful in the future.

Only reason I can think of: it's a pain to make useless class
instances when there is no reason why they can't be combined (since
you never make an instance of one without an instance of the other).

I _can_ think of a data type that could conceivably be an instance of
Pointed but not Applicative: a BloomFilter (though there's not really
any point in having a BloomFilter with only one value that I can see,
but maybe someone can since there's the singletonB function).

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list