pinchot-0.16.0.0: Write grammars, not parsers

Safe HaskellNone
LanguageHaskell2010

Pinchot.Examples.SyntaxTrees

Description

This module shows how to use Template Haskell to generate the data types corresponding to your context-free grammar. You will want to look at the source; the Haddocks will show only the generated types and not the Template Haskell that was used to generate them.

Documentation

newtype Letter t a Source

Constructors

Letter (t, a) 

Instances

Functor (Letter t) Source 
Foldable (Letter t) Source 
Traversable (Letter t) Source 
(Eq t, Eq a) => Eq (Letter t a) Source 
(Ord t, Ord a) => Ord (Letter t a) Source 
(Show t, Show a) => Show (Letter t a) Source 
Wrapped (Letter t a) Source 
type Unwrapped (Letter t a) = (t, a) Source 

data Letters t a Source

Constructors

NoLetter 
ConsLetter (Letter t a) (Letters t a) 

Instances

Functor (Letters t) Source 
Foldable (Letters t) Source 
Traversable (Letters t) Source 
(Eq t, Eq a) => Eq (Letters t a) Source 
(Ord t, Ord a) => Ord (Letters t a) Source 
(Show t, Show a) => Show (Letters t a) Source 

newtype Space t a Source

Constructors

Space (t, a) 

Instances

Functor (Space t) Source 
Foldable (Space t) Source 
Traversable (Space t) Source 
(Eq t, Eq a) => Eq (Space t a) Source 
(Ord t, Ord a) => Ord (Space t a) Source 
(Show t, Show a) => Show (Space t a) Source 
Wrapped (Space t a) Source 
type Unwrapped (Space t a) = (t, a) Source 

data Words t a Source

Instances

Functor (Words t) Source 
Foldable (Words t) Source 
Traversable (Words t) Source 
(Eq t, Eq a) => Eq (Words t a) Source 
(Ord t, Ord a) => Ord (Words t a) Source 
(Show t, Show a) => Show (Words t a) Source 

newtype Comma t a Source

Constructors

Comma (t, a) 

Instances

Functor (Comma t) Source 
Foldable (Comma t) Source 
Traversable (Comma t) Source 
(Eq t, Eq a) => Eq (Comma t a) Source 
(Ord t, Ord a) => Ord (Comma t a) Source 
(Show t, Show a) => Show (Comma t a) Source 
Wrapped (Comma t a) Source 
type Unwrapped (Comma t a) = (t, a) Source 

newtype Newline t a Source

Constructors

Newline (t, a) 

Instances

Functor (Newline t) Source 
Foldable (Newline t) Source 
Traversable (Newline t) Source 
(Eq t, Eq a) => Eq (Newline t a) Source 
(Ord t, Ord a) => Ord (Newline t a) Source 
(Show t, Show a) => Show (Newline t a) Source 
Wrapped (Newline t a) Source 
type Unwrapped (Newline t a) = (t, a) Source 

data NameLine t a Source

Instances

newtype Digit t a Source

Constructors

Digit (t, a) 

Instances

Functor (Digit t) Source 
Foldable (Digit t) Source 
Traversable (Digit t) Source 
(Eq t, Eq a) => Eq (Digit t a) Source 
(Ord t, Ord a) => Ord (Digit t a) Source 
(Show t, Show a) => Show (Digit t a) Source 
Wrapped (Digit t a) Source 
type Unwrapped (Digit t a) = (t, a) Source 

newtype Digit'Plus t a Source

Constructors

Digit'Plus (NonEmpty (Digit t a)) 

newtype Number t a Source

Constructors

Number (Digit'Plus t a) 

Instances

Functor (Number t) Source 
Foldable (Number t) Source 
Traversable (Number t) Source 
(Eq t, Eq a) => Eq (Number t a) Source 
(Ord t, Ord a) => Ord (Number t a) Source 
(Show t, Show a) => Show (Number t a) Source 
Wrapped (Number t a) Source 
type Unwrapped (Number t a) = Digit'Plus t a Source 

newtype North t a Source

Constructors

North (t, a) 

Instances

Functor (North t) Source 
Foldable (North t) Source 
Traversable (North t) Source 
(Eq t, Eq a) => Eq (North t a) Source 
(Ord t, Ord a) => Ord (North t a) Source 
(Show t, Show a) => Show (North t a) Source 
Wrapped (North t a) Source 
type Unwrapped (North t a) = (t, a) Source 

newtype South t a Source

Constructors

South (t, a) 

Instances

Functor (South t) Source 
Foldable (South t) Source 
Traversable (South t) Source 
(Eq t, Eq a) => Eq (South t a) Source 
(Ord t, Ord a) => Ord (South t a) Source 
(Show t, Show a) => Show (South t a) Source 
Wrapped (South t a) Source 
type Unwrapped (South t a) = (t, a) Source 

newtype East t a Source

Constructors

East (t, a) 

Instances

Functor (East t) Source 
Foldable (East t) Source 
Traversable (East t) Source 
(Eq t, Eq a) => Eq (East t a) Source 
(Ord t, Ord a) => Ord (East t a) Source 
(Show t, Show a) => Show (East t a) Source 
Wrapped (East t a) Source 
type Unwrapped (East t a) = (t, a) Source 

newtype West t a Source

Constructors

West (t, a) 

Instances

Functor (West t) Source 
Foldable (West t) Source 
Traversable (West t) Source 
(Eq t, Eq a) => Eq (West t a) Source 
(Ord t, Ord a) => Ord (West t a) Source 
(Show t, Show a) => Show (West t a) Source 
Wrapped (West t a) Source 
type Unwrapped (West t a) = (t, a) Source 

newtype NE'0 t a Source

Constructors

NE'0 (t, a) 

Instances

Functor (NE'0 t) Source 
Foldable (NE'0 t) Source 
Traversable (NE'0 t) Source 
(Eq t, Eq a) => Eq (NE'0 t a) Source 
(Ord t, Ord a) => Ord (NE'0 t a) Source 
(Show t, Show a) => Show (NE'0 t a) Source 
Wrapped (NE'0 t a) Source 
type Unwrapped (NE'0 t a) = (t, a) Source 

newtype NE'1 t a Source

Constructors

NE'1 (t, a) 

Instances

Functor (NE'1 t) Source 
Foldable (NE'1 t) Source 
Traversable (NE'1 t) Source 
(Eq t, Eq a) => Eq (NE'1 t a) Source 
(Ord t, Ord a) => Ord (NE'1 t a) Source 
(Show t, Show a) => Show (NE'1 t a) Source 
Wrapped (NE'1 t a) Source 
type Unwrapped (NE'1 t a) = (t, a) Source 

data NE t a Source

Constructors

NE 

Fields

_r'NE'0'NE'0 :: NE'0 t a
 
_r'NE'1'NE'1 :: NE'1 t a
 

Instances

Functor (NE t) Source 
Foldable (NE t) Source 
Traversable (NE t) Source 
(Eq t, Eq a) => Eq (NE t a) Source 
(Ord t, Ord a) => Ord (NE t a) Source 
(Show t, Show a) => Show (NE t a) Source 

newtype NW'0 t a Source

Constructors

NW'0 (t, a) 

Instances

Functor (NW'0 t) Source 
Foldable (NW'0 t) Source 
Traversable (NW'0 t) Source 
(Eq t, Eq a) => Eq (NW'0 t a) Source 
(Ord t, Ord a) => Ord (NW'0 t a) Source 
(Show t, Show a) => Show (NW'0 t a) Source 
Wrapped (NW'0 t a) Source 
type Unwrapped (NW'0 t a) = (t, a) Source 

newtype NW'1 t a Source

Constructors

NW'1 (t, a) 

Instances

Functor (NW'1 t) Source 
Foldable (NW'1 t) Source 
Traversable (NW'1 t) Source 
(Eq t, Eq a) => Eq (NW'1 t a) Source 
(Ord t, Ord a) => Ord (NW'1 t a) Source 
(Show t, Show a) => Show (NW'1 t a) Source 
Wrapped (NW'1 t a) Source 
type Unwrapped (NW'1 t a) = (t, a) Source 

data NW t a Source

Constructors

NW 

Fields

_r'NW'0'NW'0 :: NW'0 t a
 
_r'NW'1'NW'1 :: NW'1 t a
 

Instances

Functor (NW t) Source 
Foldable (NW t) Source 
Traversable (NW t) Source 
(Eq t, Eq a) => Eq (NW t a) Source 
(Ord t, Ord a) => Ord (NW t a) Source 
(Show t, Show a) => Show (NW t a) Source 

newtype SE'0 t a Source

Constructors

SE'0 (t, a) 

Instances

Functor (SE'0 t) Source 
Foldable (SE'0 t) Source 
Traversable (SE'0 t) Source 
(Eq t, Eq a) => Eq (SE'0 t a) Source 
(Ord t, Ord a) => Ord (SE'0 t a) Source 
(Show t, Show a) => Show (SE'0 t a) Source 
Wrapped (SE'0 t a) Source 
type Unwrapped (SE'0 t a) = (t, a) Source 

newtype SE'1 t a Source

Constructors

SE'1 (t, a) 

Instances

Functor (SE'1 t) Source 
Foldable (SE'1 t) Source 
Traversable (SE'1 t) Source 
(Eq t, Eq a) => Eq (SE'1 t a) Source 
(Ord t, Ord a) => Ord (SE'1 t a) Source 
(Show t, Show a) => Show (SE'1 t a) Source 
Wrapped (SE'1 t a) Source 
type Unwrapped (SE'1 t a) = (t, a) Source 

data SE t a Source

Constructors

SE 

Fields

_r'SE'0'SE'0 :: SE'0 t a
 
_r'SE'1'SE'1 :: SE'1 t a
 

Instances

Functor (SE t) Source 
Foldable (SE t) Source 
Traversable (SE t) Source 
(Eq t, Eq a) => Eq (SE t a) Source 
(Ord t, Ord a) => Ord (SE t a) Source 
(Show t, Show a) => Show (SE t a) Source 

newtype SW'0 t a Source

Constructors

SW'0 (t, a) 

Instances

Functor (SW'0 t) Source 
Foldable (SW'0 t) Source 
Traversable (SW'0 t) Source 
(Eq t, Eq a) => Eq (SW'0 t a) Source 
(Ord t, Ord a) => Ord (SW'0 t a) Source 
(Show t, Show a) => Show (SW'0 t a) Source 
Wrapped (SW'0 t a) Source 
type Unwrapped (SW'0 t a) = (t, a) Source 

newtype SW'1 t a Source

Constructors

SW'1 (t, a) 

Instances

Functor (SW'1 t) Source 
Foldable (SW'1 t) Source 
Traversable (SW'1 t) Source 
(Eq t, Eq a) => Eq (SW'1 t a) Source 
(Ord t, Ord a) => Ord (SW'1 t a) Source 
(Show t, Show a) => Show (SW'1 t a) Source 
Wrapped (SW'1 t a) Source 
type Unwrapped (SW'1 t a) = (t, a) Source 

data SW t a Source

Constructors

SW 

Fields

_r'SW'0'SW'0 :: SW'0 t a
 
_r'SW'1'SW'1 :: SW'1 t a
 

Instances

Functor (SW t) Source 
Foldable (SW t) Source 
Traversable (SW t) Source 
(Eq t, Eq a) => Eq (SW t a) Source 
(Ord t, Ord a) => Ord (SW t a) Source 
(Show t, Show a) => Show (SW t a) Source 

newtype StreetName t a Source

Constructors

StreetName (Words t a) 

newtype Street'0 t a Source

Constructors

Street'0 (t, a) 

Instances

Functor (Street'0 t) Source 
Foldable (Street'0 t) Source 
Traversable (Street'0 t) Source 
(Eq t, Eq a) => Eq (Street'0 t a) Source 
(Ord t, Ord a) => Ord (Street'0 t a) Source 
(Show t, Show a) => Show (Street'0 t a) Source 
Wrapped (Street'0 t a) Source 
type Unwrapped (Street'0 t a) = (t, a) Source 

newtype Street'1 t a Source

Constructors

Street'1 (t, a) 

Instances

Functor (Street'1 t) Source 
Foldable (Street'1 t) Source 
Traversable (Street'1 t) Source 
(Eq t, Eq a) => Eq (Street'1 t a) Source 
(Ord t, Ord a) => Ord (Street'1 t a) Source 
(Show t, Show a) => Show (Street'1 t a) Source 
Wrapped (Street'1 t a) Source 
type Unwrapped (Street'1 t a) = (t, a) Source 

data Street t a Source

Instances

Functor (Street t) Source 
Foldable (Street t) Source 
Traversable (Street t) Source 
(Eq t, Eq a) => Eq (Street t a) Source 
(Ord t, Ord a) => Ord (Street t a) Source 
(Show t, Show a) => Show (Street t a) Source 

newtype Avenue'0 t a Source

Constructors

Avenue'0 (t, a) 

Instances

Functor (Avenue'0 t) Source 
Foldable (Avenue'0 t) Source 
Traversable (Avenue'0 t) Source 
(Eq t, Eq a) => Eq (Avenue'0 t a) Source 
(Ord t, Ord a) => Ord (Avenue'0 t a) Source 
(Show t, Show a) => Show (Avenue'0 t a) Source 
Wrapped (Avenue'0 t a) Source 
type Unwrapped (Avenue'0 t a) = (t, a) Source 

newtype Avenue'1 t a Source

Constructors

Avenue'1 (t, a) 

Instances

Functor (Avenue'1 t) Source 
Foldable (Avenue'1 t) Source 
Traversable (Avenue'1 t) Source 
(Eq t, Eq a) => Eq (Avenue'1 t a) Source 
(Ord t, Ord a) => Ord (Avenue'1 t a) Source 
(Show t, Show a) => Show (Avenue'1 t a) Source 
Wrapped (Avenue'1 t a) Source 
type Unwrapped (Avenue'1 t a) = (t, a) Source 

newtype Avenue'2 t a Source

Constructors

Avenue'2 (t, a) 

Instances

Functor (Avenue'2 t) Source 
Foldable (Avenue'2 t) Source 
Traversable (Avenue'2 t) Source 
(Eq t, Eq a) => Eq (Avenue'2 t a) Source 
(Ord t, Ord a) => Ord (Avenue'2 t a) Source 
(Show t, Show a) => Show (Avenue'2 t a) Source 
Wrapped (Avenue'2 t a) Source 
type Unwrapped (Avenue'2 t a) = (t, a) Source 

data Avenue t a Source

Instances

Functor (Avenue t) Source 
Foldable (Avenue t) Source 
Traversable (Avenue t) Source 
(Eq t, Eq a) => Eq (Avenue t a) Source 
(Ord t, Ord a) => Ord (Avenue t a) Source 
(Show t, Show a) => Show (Avenue t a) Source 

newtype Way'0 t a Source

Constructors

Way'0 (t, a) 

Instances

Functor (Way'0 t) Source 
Foldable (Way'0 t) Source 
Traversable (Way'0 t) Source 
(Eq t, Eq a) => Eq (Way'0 t a) Source 
(Ord t, Ord a) => Ord (Way'0 t a) Source 
(Show t, Show a) => Show (Way'0 t a) Source 
Wrapped (Way'0 t a) Source 
type Unwrapped (Way'0 t a) = (t, a) Source 

newtype Way'1 t a Source

Constructors

Way'1 (t, a) 

Instances

Functor (Way'1 t) Source 
Foldable (Way'1 t) Source 
Traversable (Way'1 t) Source 
(Eq t, Eq a) => Eq (Way'1 t a) Source 
(Ord t, Ord a) => Ord (Way'1 t a) Source 
(Show t, Show a) => Show (Way'1 t a) Source 
Wrapped (Way'1 t a) Source 
type Unwrapped (Way'1 t a) = (t, a) Source 

newtype Way'2 t a Source

Constructors

Way'2 (t, a) 

Instances

Functor (Way'2 t) Source 
Foldable (Way'2 t) Source 
Traversable (Way'2 t) Source 
(Eq t, Eq a) => Eq (Way'2 t a) Source 
(Ord t, Ord a) => Ord (Way'2 t a) Source 
(Show t, Show a) => Show (Way'2 t a) Source 
Wrapped (Way'2 t a) Source 
type Unwrapped (Way'2 t a) = (t, a) Source 

data Way t a Source

Constructors

Way 

Instances

Functor (Way t) Source 
Foldable (Way t) Source 
Traversable (Way t) Source 
(Eq t, Eq a) => Eq (Way t a) Source 
(Ord t, Ord a) => Ord (Way t a) Source 
(Show t, Show a) => Show (Way t a) Source 

newtype Boulevard'0 t a Source

Constructors

Boulevard'0 (t, a) 

newtype Boulevard'1 t a Source

Constructors

Boulevard'1 (t, a) 

newtype Boulevard'2 t a Source

Constructors

Boulevard'2 (t, a) 

newtype Boulevard'3 t a Source

Constructors

Boulevard'3 (t, a) 

data Suffix t a Source

Instances

Functor (Suffix t) Source 
Foldable (Suffix t) Source 
Traversable (Suffix t) Source 
(Eq t, Eq a) => Eq (Suffix t a) Source 
(Ord t, Ord a) => Ord (Suffix t a) Source 
(Show t, Show a) => Show (Suffix t a) Source 

newtype City t a Source

Constructors

City (Words t a) 

Instances

Functor (City t) Source 
Foldable (City t) Source 
Traversable (City t) Source 
(Eq t, Eq a) => Eq (City t a) Source 
(Ord t, Ord a) => Ord (City t a) Source 
(Show t, Show a) => Show (City t a) Source 
Wrapped (City t a) Source 
type Unwrapped (City t a) = Words t a Source 

newtype State t a Source

Constructors

State (Words t a) 

Instances

Functor (State t) Source 
Foldable (State t) Source 
Traversable (State t) Source 
(Eq t, Eq a) => Eq (State t a) Source 
(Ord t, Ord a) => Ord (State t a) Source 
(Show t, Show a) => Show (State t a) Source 
Wrapped (State t a) Source 
type Unwrapped (State t a) = Words t a Source 

data ZipCode t a Source

Instances

Functor (ZipCode t) Source 
Foldable (ZipCode t) Source 
Traversable (ZipCode t) Source 
(Eq t, Eq a) => Eq (ZipCode t a) Source 
(Ord t, Ord a) => Ord (ZipCode t a) Source 
(Show t, Show a) => Show (ZipCode t a) Source