We have a MonadReader-like typeclass that we'd like to implement for RuntimeSplice m. Currently this is not possible, since you can't implement local. One option is to expose the RuntimeSplice constructor and unRS deconstructor. Then we could do something like:
instance OurReader m => OurReader (RuntimeSplice m) where
ourAsk = lift ourAsk
ourLocal f = RuntimeSplice . ourLocal f . unRT
Another option is to provide an instance of MonadTransControl for RuntimeSplice. This could be used to write ourLocal and would also allow use of the functions from lifted-base, like catch.
I could send a pull request for either option, if you let me know which (if any) you prefer.
We have a
MonadReader-like typeclass that we'd like to implement forRuntimeSplice m. Currently this is not possible, since you can't implementlocal. One option is to expose theRuntimeSpliceconstructor andunRSdeconstructor. Then we could do something like:Another option is to provide an instance of
MonadTransControlfor RuntimeSplice. This could be used to writeourLocaland would also allow use of the functions from lifted-base, likecatch.I could send a pull request for either option, if you let me know which (if any) you prefer.