tct-2.0.1: A Complexity Analyser for Term Rewrite Systems

Portabilityunportable
Stabilityunstable
MaintainerMartin Avanzini <martin.avanzini@uibk.ac.at>
Safe HaskellSafe-Infered

Tct.Processor.Args

Contents

Description

This module implements processor arguments.

Synopsis

Documentation

class Argument a where

Instances of this class can be used as processor arguments. Parsers are specified separately in the class ParsableArgument. The associated type 'Domain a' reflects the type of the Haskell values. This type does not necessarily need to coincide with a, but for simple instances like Bool it does, i.e. 'Domain Bool == Bool'.

Associated Types

type Domain a

Methods

domainName :: Phantom a -> String

Short string describing the argument type.

showArg :: Phantom a -> Domain a -> String

Pretty printer of arguments.

Instances

Argument Descriptions

data Arg t

This datatype captures the description of a single argument.

Constructors

Arg 

Fields

name :: String

The name of the argument.

description :: String

Optional description for the argument.

defaultValue :: Domain t

A possible default value, if the argument is optional.

isOptional_ :: Bool

Indicates wether the argument is optional.

arg :: Arg t

Constructor for description of arguments of type t.

optional :: Arg t -> String -> Domain t -> Arg t

Constructor for description of optional arguments of type t. The following describes an optional argument dimension with default value 2.

>>> optional naturalArg "dimension" 2

data Unit

Unit represents the empty argument list.

Constructors

Unit 

Instances

Show Unit 
Typeable Unit 
ParsableArguments Unit 
Arguments Unit 
Processor proc => AsStrategy (InstanceOf proc) ConstantDeclaration 
Transformer trans => AsStrategy (TheTransformer trans) ConstantDeclaration 
(Processor proc, ~ * (ProofOf proc) res) => WithProblem (InstanceOf proc) (InstanceOf (Custom Unit res)) 

data a :+: b

This operator constructs tuples of arguments.

Constructors

a :+: b 

Instances