free monad #517
Unanswered
mccraigmccraig
asked this question in
Q&A
free monad
#517
Replies: 2 comments 1 reply
-
hmm... recursive value definitions (where the recursive reference is in a closure) seem generally forbidden, e.g.
gives:
so my n00bish understanding is that that rules out free monads using the struct / implicit scheme |
Beta Was this translation helpful? Give feedback.
1 reply
-
i think i understand it a bit better now ... this all compiles, apart from the last line:
and there's no way of passing the implicit required for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted an eDSL, so I've been trying to define a free monad, starting with the functor for
free
- and I've hit a problem:So far I've got:
and the
Free
branch of thefree/functor
fmap
doesn't compile, because the inner implicit?functor
parameter can't resolvefree/functor
I'm not sure how to proceed... any ideas ?
Beta Was this translation helpful? Give feedback.
All reactions