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
How does creating and destroying objects work #229
Comments
I don't know about |
Sorry, my problem was with not understanding monad transformers in general. Now that I have a better understanding of it, this is essentially my problem: -- this works
intList :: (Monad m) => (ListT m) Int
intList = lift int
int :: (Monad m) => m Int
int = pure 7
-- This doesn't
objList :: (Monad m) => MSF (ListT m) () ()
objList = lift obj -- Error here
obj :: (Monad m) => MSF m () ()
obj = undefined The error I get is:
Which to me seems like I'm using the wrong lift operator, because the kind signature doesn't seem to match. But I can't find the one used in the paper ( |
Yes, it's really a wart that we don't have @walseb In your example, we're looking for something that lifts an |
Thanks! It works now! |
Awesome! So is this issue resolved then? |
Oh yeah I forgot to close it |
Hi! So yampa has
ListSF
as discussed here. In bearriver/dunai, using the list monad transformer seems to be the way to go, but the example in "Functional Reactive Programming, Refactored" section 4.4 doesn't compile in dunai and I haven't been able to get a it workingThe main problem is that
liftS
doesn't seem to exist in dunai.For example in:
I get the error:
Because the move MSF isn't lifted into ListT. How do I do this and is there anything else I need to think about? Also are there any bearriver projects using
ListT
or other monads likeEitherT
,Maybe
, etc.Thanks!
The text was updated successfully, but these errors were encountered: