[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?

(no subject)

Date: 2010-10-06 21:25 (UTC)
From: [identity profile] darius.livejournal.com
I don't know of anything that enforces things like monads do.

Ask MarkM about Concurrent Prolog. IIRC I/O was handled as incrementally-filled-in lists, analogous to pre-monad Haskell using lazy lists, but using logic variables. Oz would be a more modern example.

Mercury's approach is more like Clean's uniqueness types than monads, IIRC.