Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
I am currently working on a project that features Shake for a lot of the infrastructure code. As far as I can tell, it looks like:
main = shake shakeOptions $ do action $ do b <- doesFileExist "file.src" when b $ need ["file.out"]
is the easiest way to run an action. Any advice? I want to run the action to inspect its side effects.
:cricket:
Development.Shake.Forward (which rib-sample uses by default) is the easiest way.
Development.Shake.Forward
cool, ty. And as you probably figuired, this is the context I am trying to use this in :P
In fact, rib actually uses the Forward mechanism by default. It calls shakeForward opts ... (not shake opts ...). https://github.com/srid/rib/blob/0c748f4/src/Rib/App.hs#L123
shakeForward opts ...
shake opts ...
I find it a nicer way to write build actions. You can forget about Makefile-sque structure, and focus on what needs to be done, by writing it like regular shell script.
Eg.: https://github.com/srid/website/blob/ca765de/src/Main.hs#L26-L48 (uses older Rib api, but principles stand)
I am currently working on a project that features Shake for a lot of the infrastructure code. As far as I can tell, it looks like:
is the easiest way to run an action. Any advice? I want to run the action to inspect its side effects.
:cricket:
Development.Shake.Forward
(which rib-sample uses by default) is the easiest way.cool, ty. And as you probably figuired, this is the context I am trying to use this in :P
In fact, rib actually uses the Forward mechanism by default. It calls
shakeForward opts ...
(notshake opts ...
). https://github.com/srid/rib/blob/0c748f4/src/Rib/App.hs#L123I find it a nicer way to write build actions. You can forget about Makefile-sque structure, and focus on what needs to be done, by writing it like regular shell script.
Eg.: https://github.com/srid/website/blob/ca765de/src/Main.hs#L26-L48 (uses older Rib api, but principles stand)