cli-arguments-0.2.0.0: A library to process command line arguments in some more convenient way.
Copyright(c) OleksandrZhabenko 2021
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

CLI.Arguments

Description

A library to process command line arguments in some more convenient way.

Synopsis

Documentation

data Arguments Source #

Constructors

A String 
B Int String [String] 
C String [String] 

Instances

Instances details
Eq Arguments Source # 
Instance details

Defined in CLI.Arguments

Show Arguments Source # 
Instance details

Defined in CLI.Arguments

args2ArgsFiltered :: CLSpecifications -> [String] -> Args Source #

This function can actually parse the command line arguments being the [String] so that some of them will disappear because of the CLSpecifications provided and the order of the arguments.

takeCsSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for Cs.

-> CLSpecifications 
-> [String] 
-> Args 

takeBsSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for Bs.

-> CLSpecifications 
-> [String] 
-> Args 

takeAsSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for As.

-> CLSpecifications 
-> [String] 
-> Args 

takeCsArrSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for Cs.

-> CLSpecifications 
-> [String] 
-> Array Int Arguments 

takeBsArrSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for Bs.

-> CLSpecifications 
-> [String] 
-> Array Int Arguments 

takeAsArrSortedBy Source #

Arguments

:: (Arguments -> Arguments -> Ordering)

A compare-like implementation for Arguments. If needed you can implement your own Ord instance for Arguments and use it here. Here can be partial, just for As.

-> CLSpecifications 
-> [String] 
-> Array Int Arguments