▲ | mrkeen a day ago | ||||||||||||||||
Could have been a stronger point by using a non-monadic >>=.I've been doing a lot of parsing lately and I find I don't need to reach all the way for monad (applicative is usually enough). But I guess that's what ApplicativeDo[1] is for.
This is a bit rough for usability (not to mention also undermines the point above).But overall I like the approach of trying something radically new. [1] https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/appl... | |||||||||||||||||
▲ | kccqzy a day ago | parent [-] | ||||||||||||||||
ApplicativeDo can be thought of as a compile-time transformation that turns sequential code into possibly parallel* code just by analyzing the way variables are used. Once I've had that realization I really appreciated it more. *: By "possibly parallel" I mean the blocks of code are known to be independent from each other. They could be actually executed in parallel if the Applicative instance does so. | |||||||||||||||||
|