Closed parsonsmatt closed 6 years ago
This PR allows the user to provide an Args datatype that represents the command line arguments.
Args
The user would put the type in the module:
module Lib.FooTask where data Args = Args { fooName :: String } task :: Args -> IO () task args = putStrLn (fooName args)
The corresponding command type gets:
data Command = Foo { fooName :: String }
And when casing on it, we do:
case cmd of Foo {..} -> Lib.FooTask.task Lib.FooTask.Args {..}
This PR allows the user to provide an
Args
datatype that represents the command line arguments.The user would put the type in the module:
The corresponding command type gets:
And when casing on it, we do: