Currently Shake has a few functions that are like those in base, but
tracked. It also has some that are in base (or could be), but are
untracked. The naming conventions and types are somewhat random. As a
few examples:
* writeFile' is writeFile lifted into the Action monad.
* writeFileChanged is a variation on writeFile which could be in
MonadIO but is in Action.
* readFile' is a tracked version of readFile in base.
* doesFileExist is a tracked version of doesFileExist in System.Directory.
Clearly the readFile'/doesFileExist is a little inconsistent - the
original logic was that readFile is in the Prelude so it guarantees to
clash, while doesFileExist only clashes if you import
System.Directory. Both writeFile' and writeFileChanged could be in
MonadIO. I think I've tied myself into a mess over what would be the
ideal form to provide. So, questions:
* Should things that are able to be MonadIO be MonadIO?
* Should things that don't clash get 'd? e.g. writeFileChanged'?
* Should things that clash but not in the Prelude be 'd? e.g. doesFileExist?
I'm not really sure what the "best" option is, so welcome any thoughts
people have. The ticket that started this is
https://github.com/ndmitchell/shake/issues/443 - discussing the name
for getEnv like functionality.
(Of course, even if we can come up with the perfect scheme,
implementing it may have issues with reverse compatibility - but
important to know what the right scheme is and thus what the exception
is - at the moment I don't even know the rule!)
Thanks, Neil