-
Notifications
You must be signed in to change notification settings - Fork 78
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
"Composing ADTs" tutorial code does not work as expected #343
Comments
Hi Matthew,
The reality is that Eff has few active users and you'll probably need to
debug things for yourself to make progress with the library.
It was built by Eric Torreborre but he has since moved mainly to haskell.
I've switched from Eff to cats MTL myself, or even simpler, tagless final
when that will suffice. A key reason was to reduce the internal complexity
of my projects. Have you considered MTL?
…On Sat., 27 Feb. 2021, 5:33 am Matthew Healy, ***@***.***> wrote:
Hi folks,
I started following the eff tutorial earlier today. When I reached the
section on Composing ADTs with the Eff monad
<https://atnos-org.github.io/eff/org.atnos.site.Tutorial.html#composing-adts-with-the-eff-monad>
I found that I was completely unable to get the code to run in the way the
documentation suggests it should.
You can find my attempt on Scastie here
<https://scastie.scala-lang.org/matthew-healy/xMnf4728QO29mc8pHueJyA/22>.
I've checked my code multiple times and I can't find any differences to the
code in the tutorial. However, as far as I can tell, only the first line of
the for-comprehension in program is ever "run".
E.g. if I modify program to instead read:
def program[R :_interact :_dataOp]: Eff[R, Unit] =
for {
_ <- tellUser("hello")
_ <- tellUser("goodbye")
} yield ()
only hello is printed to the console.
Apologies if a GH issue isn't the right place to raise this, but I've been
banging my head against it for a while and have absolutely no idea what (if
anything) I've done wrong. Any help would be much appreciated (as would
pointers on a better place to ask this question, if appropriate 😄 ).
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#343>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXJZCU3INMISD23KFK5YTTA7SQ3ANCNFSM4YI5DMZQ>
.
|
Hey Ben - that's totally fair, thanks for letting me know! I'll take a look at cats MTL instead. 😁 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi folks,
I started following the eff tutorial earlier today. When I reached the section on Composing ADTs with the Eff monad I found that I was completely unable to get the code to run in the way the documentation suggests it should.
You can find my attempt on Scastie here. I've checked my code multiple times and I can't find any differences to the code in the tutorial. However, as far as I can tell, only the first line of the for-comprehension in
program
is ever "run".E.g. if I modify
program
to instead read:only
hello
is printed to the console.Apologies if a GH issue isn't the right place to raise this, but I've been banging my head against it for a while and have absolutely no idea what (if anything) I've done wrong. Any help would be much appreciated (as would pointers on a better place to ask this question, if appropriate 😄 ).
Thanks!
The text was updated successfully, but these errors were encountered: