From 9e2115422c7d066b8ffb4ef0a4b02c7eb758db3e Mon Sep 17 00:00:00 2001 From: spwhitton Date: Thu, 3 Dec 2015 02:08:58 +0000 Subject: Added a comment --- .../comment_9_5694c0bec217d3513aa8e80f55482d75._comment | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/todo/pull_request:_patch_Apt.buildDep_to_only_proceed_if_installable/comment_9_5694c0bec217d3513aa8e80f55482d75._comment (limited to 'doc/todo/pull_request:_patch_Apt.buildDep_to_only_proceed_if_installable') diff --git a/doc/todo/pull_request:_patch_Apt.buildDep_to_only_proceed_if_installable/comment_9_5694c0bec217d3513aa8e80f55482d75._comment b/doc/todo/pull_request:_patch_Apt.buildDep_to_only_proceed_if_installable/comment_9_5694c0bec217d3513aa8e80f55482d75._comment new file mode 100644 index 00000000..5783dd7b --- /dev/null +++ b/doc/todo/pull_request:_patch_Apt.buildDep_to_only_proceed_if_installable/comment_9_5694c0bec217d3513aa8e80f55482d75._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="spwhitton" + subject="comment 9" + date="2015-12-03T02:08:58Z" + content=""" +I can get what I want if I use `trivial` and `changesFile` in the way you described. So please consider adding your method as a combinator: + + p `changeIfChanges` f = (trivial p) `changesFile` f + +which is okay because `trivial` is idempotent so `changeIfChanges` may be applied more than once (I've got this in my branch with a decent docstring and I've applied it to `Apt.buildDep`). + +I think that this ought to be its own combinator, rather than just a recommendation to use `trivial` and `changesFile` in such cases, because this doesn't follow the semantics of `trivial`: it's not necessarily the case that it is the same amount of work to check if the property needs to be ensured as it is to ensure it. + +(In this language, my `noChangeIfUnchanged` could be called `changeOnlyIfChanges`. I agree that it's very unlikely to useful.) + +(Again, on my machine, applying `changeIfChanges` to `Apt.buildDep` magically hides apt's output if the build-deps are already installed.) +"""]] -- cgit v1.2.3