haskell / mtl

The Monad Transformer Library
http://www.haskell.org/haskellwiki/Monad_Transformers
Other
360 stars 63 forks source link

Conversions between lazy and strict StateT #139

Open treeowl opened 1 year ago

treeowl commented 1 year ago

Should there be functions to convert between strict and lazy StateT variants?

strictToLazyStateT :: Strict.StateT s m a -> Lazy.StateT s m a
strictToLazyStateT (Strict.StateT f) = Lazy.StateT f

lazyToStrictStateT :: Lazy.StateT s m a -> Strict.StateT s m a
lazyToStrictStateT (Lazy.StateT f) = Strict.StateT f