Why Shake dependencies are explicitly `needed`? -
i find first example of shake
usage demonstrating pattern seems error prone:
contents <- readfilelines $ out -<.> "txt" need contents cmd "tar -cf" [out] contents
why need need contents
when readfilelines
reads them , cmd
references them? can avoid requiring applicativedo
?
i think part of confusion may types/semantics of contents
. file out -<.> "txt"
contains list of filenames, contents
list of filenames. when need contents
requiring files created , depended upon, using filenames specify files. when pass contents
on cmd
passing filenames tar
use query files.
so key point readfilelines
doesn't read files in question, reads filenames out of file. have use need
make sure using files fine, , use files in cmd
. way of looking @ 3 lines is:
- which files want operate on?
- make sure files ready.
- use files.
does make sense? there's no relationship applicativedo
- it's presence wouldn't @ all.
Comments
Post a Comment