coalpit-0.1.1.1: Command-line options and DSV parsing and printing

Maintainerdefanor <defanor@uberspace.net>
Stabilityunstable
Portabilitynon-portable (uses GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Coalpit.Parsing

Description

This module provides functions useful for argument parsing.

Synopsis

Documentation

type Parser = Parsec Void [CLArg] Source #

Command-line arguments parser.

newtype CLArg Source #

Command-line argument wrapper, used to avoid orphan ShowToken String and Stream [String] instances.

Constructors

CLArg 

Fields

Instances
Eq CLArg Source # 
Instance details

Defined in Coalpit.Parsing

Methods

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

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

Ord CLArg Source # 
Instance details

Defined in Coalpit.Parsing

Methods

compare :: CLArg -> CLArg -> Ordering #

(<) :: CLArg -> CLArg -> Bool #

(<=) :: CLArg -> CLArg -> Bool #

(>) :: CLArg -> CLArg -> Bool #

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

max :: CLArg -> CLArg -> CLArg #

min :: CLArg -> CLArg -> CLArg #

ShowToken CLArg Source # 
Instance details

Defined in Coalpit.Parsing

Stream [CLArg] Source #

A list of strings (command-line arguments) stream.

Instance details

Defined in Coalpit.Parsing

Associated Types

type Token [CLArg] :: Type #

type Tokens [CLArg] :: Type #

type Tokens [CLArg] Source # 
Instance details

Defined in Coalpit.Parsing

type Tokens [CLArg] = [CLArg]
type Token [CLArg] Source # 
Instance details

Defined in Coalpit.Parsing

type Token [CLArg] = CLArg

pS :: Parsec Void String a -> Parsec Void [CLArg] a Source #

Applies a String parser to a single argument.

readArg :: Read a => Parser a Source #

Reads an argument using its Read instance.

pTime Source #

Arguments

:: ParseTime a 
=> TimeLocale

Options, to read timeLocale from.

-> String

Time format to use.

-> Parser a 

Parses a time argument.