Stacking up state transformers

Guest, Simon
Tue, 4 Feb 2003 17:24:29 -0000

This is a multi-part message in MIME format.

Content-Type: text/plain;

Thanks to Andrew, I'm now backtracking my state correctly.

Now what I want to do is have two elements of state, an element that gets backtracked,
and an element that doesn't.

My monad now looks like this:

type NondetState bs ns a = StateT bs (NondetT (StateT ns Maybe)) a

where bs is my backtracked state, and ns my non-backtracked state.

I can still access my backtracked state using Control.Monad.State.{get,put}, but
I can't access my non-backtracked state.

How do I burrow through the stack of monad transformers to get and put the 'ns' state?

Supplementary question: What documentation should I be reading?


Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;

Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury, Bracknell, 
Berkshire. RG12 8FZ

The information contained in this e-mail and any attachments is confidential to Roke 

Manor Research Ltd and must not be passed to any third party without permission. This 

communication is for information only and shall not create or change any contractual