Stacking up state transformers
Guest, Simon
simon.guest@roke.co.uk
Tue, 4 Feb 2003 17:24:29 -0000
This is a multi-part message in MIME format.
--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
charset="iso-8859-1"
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?
cheers,
Simon
--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
name="RMRL-Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="RMRL-Disclaimer.txt"
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
relationship.
--------------InterScan_NT_MIME_Boundary--