From: "Frank A. Christoph" <christo@nextsolution.co.jp>
To: "John Prevost" <prevost@maya.com>
Cc: "CAML Mailing list" <caml-list@inria.fr>
Subject: RE: A propos de monad/About monads
Date: Tue, 5 Oct 1999 14:48:53 +0900 [thread overview]
Message-ID: <000301bf0ef5$4e5da6c0$0150ebca@nextsolution.co.jp> (raw)
In-Reply-To: <m3ln9j2bx6.fsf@isil.maya.com>
> I spent some time last year working with monadic parsers--this is
> another really nice way to use monads (especially if you have monad
> comprehensions.)
> ...[example omitted]...
Ah! Parsers a great example of a useful monad without side-effects; I can't
believe I forgot to mention them. Actually, though, I have been using
Swierstra & Duponcheel's parser combinators (they are much more efficient)
for a while now and these, as is now well-known, cannot be expressed as a
monad.
Interested people can find out about them at:
http://www.cs.uu.nl/groups/ST/Software/Parse/
> Unfortunately, this kind of thing (along with other higher-order
> combinator stuff for, as an example, formatted printing) doesn't work
> that well in ML because of the value restriction. :(
Yes. And maybe one reason I didn't mention parsers is that combinator
languages like this do not work as nicely in eager languages like ML as they
do in non-strict ones like Haskell. Aside from the fact that you have to
eta-expand lots of definitions, eager evaluation also forces you to turn
recursive operators like (say) the Kleene star into primitives, whereas in a
lazy regime you can define them at the object level, i.e., in terms of other
combinators. I guess you got around this by using the Lazy module...?
--FAC
prev parent reply other threads:[~1999-10-05 8:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-30 16:24 A propos de monad Stéphane Baubillier
1999-10-01 7:17 ` David Gross
1999-10-01 9:26 ` A propos de monad/About monads David Mentr'e
1999-10-02 18:10 ` David Brown
1999-10-04 8:40 ` Frank A. Christoph
1999-10-04 14:46 ` Frank A. Christoph
1999-10-04 21:20 ` Jan Skibinski
1999-10-04 18:55 ` John Prevost
1999-10-05 5:48 ` Frank A. Christoph [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000301bf0ef5$4e5da6c0$0150ebca@nextsolution.co.jp' \
--to=christo@nextsolution.co.jp \
--cc=caml-list@inria.fr \
--cc=prevost@maya.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox