For those who are unfamiliar with free, it's basically a version of a monad which only 'Keeps Track' of the things you'd like to do rather than actually executing them. Even IOs are just stored in a wrapper without being executed. Then once the actions are all sequenced you run them through an 'interpreter' which actually does things based on a mapping from the Action Descriptions to actual functionality.
Re-writing in terms of Free adds a little boilerplate; but gives us much more expressability and power. It allows us to log out ever message we perform; it allows us to "mock out" results from IO calls, and makes testing much simpler.
It is a little more confusing; so if you have questions please ask; but I definitely believe that it's in Rasa's best interests in the long run!
For those who are unfamiliar with
free
, it's basically a version of a monad which only 'Keeps Track' of the things you'd like to do rather than actually executing them. EvenIO
s are just stored in a wrapper without being executed. Then once the actions are all sequenced you run them through an 'interpreter' which actually does things based on a mapping from the Action Descriptions to actual functionality.Re-writing in terms of Free adds a little boilerplate; but gives us much more expressability and power. It allows us to log out ever message we perform; it allows us to "mock out" results from IO calls, and makes testing much simpler.
It is a little more confusing; so if you have questions please ask; but I definitely believe that it's in Rasa's best interests in the long run!