fpco / stackage-cli

MIT License
28 stars 4 forks source link

stackage executable target #3

Closed chrisdone closed 9 years ago

chrisdone commented 9 years ago

The executable target stackage in the stackage-cli package is a Git-inspired plugin system. It will do nothing other than launch other programs and list help.

For better use by other Haskell code, it may be good to put the code for finding and running plugins in the stackage-cli library and have the executable really be a trivial 10 liner Main.hs.

Also: Make an alias which just re-uses Main.hs called stk.

DanBurton commented 9 years ago

I've got it working so that it discovers and runs the appropriate submodules, and verified this with a fake stackage-init on my path. (It also picked up the fact that there was a stackage-server on my path, which I had quite forgotten about and subsequently removed.) There's some work that needs to be done wrt allowing interactive submodules to interact. Currently the submodule is called with an empty stdin and is not hooked up to the "real" stdin.

All plugin commands should provide some way of printing out one line of summary of what the command does.

Done. I've chosen --summary. Building your app with Stackage.CLI.simpleOptions will generate this flag for you.

it may be good to put the code for finding and running plugins in the stackage-cli library and have the executable really be a trivial 10 liner Main.hs.

Done. Plugins can be found via discoverSubmodulesOf stackageModule, both identifiers exported by Stackage.CLI.