What is the difference between different orderings of the same monad transformers?
问题 I am attempting to define an API to express a particular type of procedure in my program. newtype Procedure a = { runProcedure :: ? } There is state, consisting of a mapping of IDs to records: type ID = Int data Record = { ... } type ProcedureState = Map ID Record There are three basic operations: -- Declare the current procedure invalid and bail (similar to some definitions of fail for class Monad) abort :: Procedure () -- Get a record from the shared state; abort if the record does not