easy-args-0.1.0.1: Parses command line arguments
Copyright(C) Jonathan Lamothe
LicenseLGPL-3
Maintainerjonathan@jlamothe.net
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

EasyArgs

Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Synopsis

Documentation

data Arg Source #

Defines an argument type

Constructors

Dash

Represents a single dash i.e.: "-"

DoubleDash

Represents a double dash i.e.: "--"

Flag Char

Represents a single character flag, e.g.: "-a"

Tag String

Represents a multi-character tag, e.g.: "--foo"

ArgText String

Represents a non-dashed argument, e.g.: "foo"

Instances

Instances details
Eq Arg Source # 
Instance details

Defined in EasyArgs

Methods

(==) :: Arg -> Arg -> Bool #

(/=) :: Arg -> Arg -> Bool #

Show Arg Source # 
Instance details

Defined in EasyArgs

Methods

showsPrec :: Int -> Arg -> ShowS #

show :: Arg -> String #

showList :: [Arg] -> ShowS #

parseArg :: String -> [Arg] Source #

Parses a single argument string to a list of Args

parseArgs :: [String] -> [Arg] Source #

Parses a list of argument strings to a list of Args