by tadfisher · 3y ago · 0 comments
Or maybe, you could pass some kind of "scope" interface that provides functions for executing side effects. So "impure(IO) function printStuff()" brings all the functions in IO into scope for the body of printStuff.
More likely it would lead to most functions looking like they are pure, whether they are actually pure or not. For example, any function written before the "impure" modifier was introduced would look pure.