[Haskell-cafe] What is this applicative functor?

Joachim Breitner mail at joachim-breitner.de
Wed Feb 1 19:03:47 UTC 2017


Hi,

already fixed in the repo, but not worth an upload.

Thanks!
Joachim

Am Mittwoch, den 01.02.2017, 19:13 +0100 schrieb Simon Jakobi via
Haskell-Cafe:
> Hi Joachim,
> 
> that's a very interesting type, thanks for sharing it!
> 
> Please note that in the rendering of the package description at
> http://hackage.haskell.org/package/successors, the <*> is slightly
> mangled.
> 
> Cheers,
> Simon
> 
> 2017-02-01 18:39 GMT+01:00 Joachim Breitner <mail at joachim-breitner.de
> >:
> > Hi,
> > 
> > Am Mittwoch, den 01.02.2017, 10:33 -0500 schrieb Joachim Breitner:
> > > Hi,
> > > 
> > > David wrote:
> > > > How about this?
> > > > 
> > > > hd (OneStep x xs) = x
> > > > 
> > > > instance Monad OneStep where
> > > >     OneStep x xs >>= f = OneStep y (map (hd . f) xs ++ ys)
> > > >         where
> > > >         OneStep y ys = f x
> > > > 
> > > > Not sure if it’s good for anything, but it seems valid and
> > > > consistent
> > > > based on a preliminary investigation.
> > > 
> > > 
> > > Yes, this looks reasonable. Did you happen to already work
> > > through the
> > > monad laws?
> > 
> > Just did, all looks fine:
> > https://github.com/nomeata/haskell-successors/blob/c1fd614cb0fc3e3b
> > 5dbf0338f835a91ea78e0b63/src/Control/Applicative/Successors.hs#L82
> > 
> > Uploaded to http://hackage.haskell.org/package/successors in case
> > someone wants to play with it.
> > 
> > Greetings,
> > Joachim
> > --
> > Joachim “nomeata” Breitner
> >   mail at joachim-breitner.dehttps://www.joachim-breitner.de/
> >   XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
> >   Debian Developer: nomeata at debian.org
> > 
> > _______________________________________________
> > Haskell-Cafe mailing list
> > To (un)subscribe, modify options or view archives go to:
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> > Only members subscribed via the mailman list are allowed to post.
> 
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttps://www.joachim-breitner.de/
  XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170201/6ff79680/attachment.sig>


More information about the Haskell-Cafe mailing list