Currently if we want to represent our "global settings" r in the evaluation monad, we must specify the transformer like so:
EvaluationT (ReaderT r m) a
It would be more ideal to be able to represent the "global settings" in either of the following ways:
Evaluation r a
EvaluationT r m a
This construction provides more flexibly access to the global setting in either the "pure" evaluation context or the "impure" monad transformer context. This construction is likely to also use less memory.
We can then specialize SearchState and similar types to EvaluationT GlobalSettings IO a if we so desire.
The new EvaluationT r m a has been implemented as a newtyped RWST from transformers, which has had the infamous WriterT "space leak" fixed since version 0.5.6.
Currently if we want to represent our "global settings"
r
in the evaluation monad, we must specify the transformer like so:It would be more ideal to be able to represent the "global settings" in either of the following ways:
This construction provides more flexibly access to the global setting in either the "pure" evaluation context or the "impure" monad transformer context. This construction is likely to also use less memory.
We can then specialize
SearchState
and similar types toEvaluationT GlobalSettings IO a
if we so desire.