Closed sdzx-1 closed 2 years ago
Aren't these just different types with different purposes? There is no absolute "right" or "wrong", which is better depends on the job. However, a big part of the appeal of ContT
is that you can define its Functor
/Applicative
/Monad
instances uniformly for all m
, not only monads, so this version wouldn't be an acceptable replacement for those who rely on that feature.
hello, everyone. I found ContT a bit weird.
Why can't we define it like this?
https://github.com/EMQ-YangM/fused-effects-cont/blob/5fd9dc23b3640a9702acacdf55f450dfb6c719db/src/Cont.hs#L24-L52 It seems more normal to look at it this way.
I hope I can use ContT in fused-effects. If I have any mistakes, please let me know.