On Sat, 27 Aug 2011, Sönke Hahn wrote:

Hi!

I was reading through the Typeclassopedia ([1]) and I was wondering which type could be an instance of Pointed, but not of Applicative. But I can't think of one. Any ideas?

(Identity :+: Store s) is a comonad that is also instance of Pointed, but I do not believe it is an instance Applicative.

newtype SemiStore s a = (Identity :+: Store s) a

instance Pointed (SemiStore s) where
  pure a = Inl (Identity a)

Coalgebras of the (Identity :+: Store s) comonad form the type of partial lenses so this isn't just an academic functor.

--
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to