[Haskell-cafe] Building pattern and trying monads
wren ng thornton
wren at freegeek.org
Sun May 27 22:15:23 CEST 2012
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/Control-Unification-IntVar.html
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list