argparser-0.3.1: Command line parsing framework for console applications

Portabilityportable
Stabilityunstable
Maintainersimon.bergot@gmail.com
Safe HaskellSafe-Inferred

System.Console.ArgParser.Parser

Description

Functions used to specify a parser for command line arguments.

Synopsis

Documentation

class ParamSpec spec whereSource

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

Methods

getParser :: spec res -> Parser resSource

getParamDescr :: spec res -> [ParamDescr]Source

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

Converts any ParamSpec to a ParserSpec

parsedBy :: ParamSpec spec => (a -> b) -> spec a -> ParserSpec bSource

Build a parser from a type constructor and a ParamSpec

 MyApp `parsedBy` myparamspec

andBy :: ParamSpec spec => ParserSpec (a -> b) -> spec a -> ParserSpec bSource

Build a parser from a parser and a ParamSpec

 MyApp `parsedBy` myparamspec `andBy` myotherparamspec

subParser :: ParamSpec spec => (a -> b) -> spec a -> ParserSpec bSource

This is parsedBy with a different fixity.