argparser-0.3.3: Command line parsing framework for console applications

Copyright(c) Simon Bergot
LicenseBSD3
Maintainersimon.bergot@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

System.Console.ArgParser.Parser

Description

Functions used to specify a parser for command line arguments.

Synopsis

Documentation

class ParamSpec spec where Source

interface allowing to define a basic block of a command line parser

Methods

getParser :: spec res -> Parser res Source

getParamDescr :: spec res -> [ParamDescr] Source

liftParam :: ParamSpec spec => spec res -> ParserSpec res Source

Converts any ParamSpec to a ParserSpec

parsedBy :: ParamSpec spec => (a -> b) -> spec a -> ParserSpec b infixl 1 Source

Build a parser from a type constructor and a ParamSpec

MyApp `parsedBy` myparamspec

andBy :: ParamSpec spec => ParserSpec (a -> b) -> spec a -> ParserSpec b infixl 1 Source

Build a parser from a parser and a ParamSpec

MyApp `parsedBy` myparamspec `andBy` myotherparamspec

subParser :: ParamSpec spec => (a -> b) -> spec a -> ParserSpec b infixr 3 Source

This is parsedBy with a different fixity.