[personal profile] kpreid

Has anything been done in logic programming (especially in languages not too far from the classic Prolog) which is analogous to monads and the IO monad in Haskell; that is, providing a means of performing IO or other side-effects which does not have the programmer depend on the evaluation/search order of the language?

In other words, what is to Prolog as Haskell is to ML?

Re: Mercury

Date: 2010-10-06 15:14 (UTC)
From: [identity profile] virkony.livejournal.com
Agree. Actually Mercury have no monads which can be combined etc. It works more like direct passing of RealWorldState through arguments (Unique Input and Destructive Output). But it allows it only for det and cc_multi (commited choice) modes as I remember. So it maintains purity and allows much more nice features (like custom modes and instances), but it still need improvements.