[Haskell-cafe] Re: Converting IO [XmlTree] to [XmlTree]
Matthew Gruen
wikigracenotes at gmail.com
Tue Apr 28 04:33:30 EDT 2009
On Mon, Apr 27, 2009 at 4:19 PM, Martijn van Steenbergen <
martijn at van.steenbergen.nl> wrote:
>
> They are in order of power: every monad is an applicative; every
> applicative is a functor; every functor is pointed.
>
> Though I can't think of any non-functor pointiness at the moment.
>
> Martijn.
>
On the other hand, here's an un-pure-able and un-point-able functor:
instance Functor ((,) m) where
--fmap :: (n -> n') -> (m, n) -> (m, n')
fmap f (m, n) = (m, f n)
n -> (m, n) is not a function you can write in general without bottom values
(unless you specify that m is a monoid, using mempty). Nor is Pointed in the
f () sense, since forall a. (a, ()) isn't something for which a value can be
pulled out of thin non-bottom air. But... getting a bit off-topic >_>
—Gracenotes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090428/2b5ed230/attachment.htm
More information about the Haskell-Cafe
mailing list