From: Alex S. <ale...@gm...> - 2014-12-22 17:24:28
|
Hello. Did anybody consider using monads in CIL? Passing state implicitely is a useful feature - I've seen this while developing some simple monadic parser combinators in Haskell (or interpreter, where the monadic state is the context of the evaluation) - see, if interested, papers http://eprints.nottingham.ac.uk/223/1/pearl.pdf or http://www.cs.nott.ac.uk/~gmh/monparsing.pdf. Now, there are monad implementations in OCaml (they don't come in the stdlib as in Haskell). I ask about monads in CIL because I've met at least once the need of having a history with the previous visited objects in CIL visitors. Now, clearly one can implement such history without complex constructs such as monads :) Best regards, Alex |