
27 May
2012
27 May
'12
4:15 p.m.
On 5/27/12 8:21 AM, L Corbijn wrote:
2. My solution with saving/reverting monad-stacks seems quite a hassle/hack, so is it a good approach or is there something better?
One good solution for backtracking is to use logict[1]. I've used it with various state-like monads and it works well (e.g., the IntBindingT monad in unification-fd[2]). [1] http://hackage.haskell.org/package/logict http://okmij.org/ftp/papers/LogicT.pdf [2] http://hackage.haskell.org/package/unification-fd http://hackage.haskell.org/packages/archive/unification-fd/0.7.0/doc/html/Co... -- Live well, ~wren