Support for F# Option Type
v0.4.0-alpha
New Features
- Add support for F# option types via
Input.OptionMaybe
andInput.ArgumentMaybe
(See README.md for updated examples) - Added
FSharp.SystemCommandLine.Aliases
module withOpt<'T>
andArg<'T>
convenience aliases forSystem.CommandLine.Option<'T>
andSystem.CommandLine.Argument<'T>
. (This should only be needed if you need to fall back to the core API in the case that a feature is missing from theInput.Option
andInput.Argument
helpers.)
Breaking Changes
- Reworked all
Input.Option
andInput.Argument
overloads that took agetDefaultValue
anonymous function to use adefaultValue
instead. This makes the most common use case much cleaner for F# by removing the anonymous function syntax.
Before:
let words = Input.Option(["--word"; "-w"], (fun () -> Array.empty), "A list of words to be appended")
After:
let words = Input.Option(["--word"; "-w"], Array.empty, "A list of words to be appended")