Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MonadTrans #130

Open
treeowl opened this issue Aug 1, 2021 · 3 comments
Open

Add MonadTrans #130

treeowl opened this issue Aug 1, 2021 · 3 comments

Comments

@treeowl
Copy link

treeowl commented Aug 1, 2021

I don't see anything for MonadTrans. I recommend using this base monad for testing it:

data TestF a = TestF !Int [a]
  deriving (Functor, Eq, Show)
newtype TestM a = TestM (Free TestF a)

where it's easier to define a Free monad locally (with lots of StandaloneDeriving) than to do the Show1, Eq1, etc., gunk needed to use the one in Free.

@treeowl
Copy link
Author

treeowl commented Aug 1, 2021

Of course, you could also unpack TestF into the free monad for efficiency. Dunno if it's worth the loss of clarity.

@andrewthad
Copy link
Owner

I'm fine with this if anyone wants to implement it. I'm not terribly concerned about efficiency or even about the particular implementation, as long as it works.

@treeowl
Copy link
Author

treeowl commented Aug 2, 2021

I can try, though I'm not really familiar with the way things are done in this package. MonadTrans properties are really just the most basic one might want for lift. I have much less of a clue about how one might effectively test that it lifts MonadReader, MonadError, etc., properties correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants