coalpit-0.1.1.0: 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 # 

Methods

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

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

Ord CLArg Source # 

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 # 
Stream [CLArg] Source #

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

type Tokens [CLArg] Source # 
type Tokens [CLArg] = [CLArg]
type Token [CLArg] Source # 
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.