Closed snowleopard closed 6 years ago
👍 - wondering if all build systems could be transformers... that would make #1 more compelling
@simonpj and I have just figured out that task transformers are also interesting: it seems that we can rewrite all our process
functions into this form: process :: k -> Task c k v -> Task (c + Update i) k v
. In other words, we take a singleton Task
and transform it by wrapping the fetch
with additional functionality to update the build information i
. Now build algorithms topological
etc just need to plumb the Update i
bit somehow.
Let's brainstorm further :)
@ndmitchell @simonpj This, on the other hand, is cool :-)
Here we turn an incorrect monadic build system
dumb
into a correct applicativetopoDumb
by applying thetopologicalT
build transformer.Note that
topoDumb
is still not minimal, since it stores no build information and can't track changes.