pinchot-0.18.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

Bifunctor Letter Source 
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

newtype Space t a Source

Constructors

Space (t, a) 

Instances

Bifunctor Space Source 
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 

newtype Comma t a Source

Constructors

Comma (t, a) 

Instances

Bifunctor Comma Source 
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

newtype Digit t a Source

Constructors

Digit (t, a) 

Instances

Bifunctor Digit Source 
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 Number t a Source

Constructors

Number (Digit'Plus t a) 

Instances

newtype North t a Source

Constructors

North (t, a) 

Instances

Bifunctor North Source 
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

Bifunctor South Source 
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

Bifunctor East Source 
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

Bifunctor West Source 
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

Bifunctor NE'0 Source 
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

Bifunctor NE'1 Source 
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

Bifunctor NE Source 
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

Bifunctor NW'0 Source 
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

Bifunctor NW'1 Source 
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

Bifunctor NW Source 
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

Bifunctor SE'0 Source 
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

Bifunctor SE'1 Source 
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

Bifunctor SE Source 
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

Bifunctor SW'0 Source 
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

Bifunctor SW'1 Source 
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

Bifunctor SW Source 
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 Street'0 t a Source

Constructors

Street'0 (t, a) 

Instances

newtype Street'1 t a Source

Constructors

Street'1 (t, a) 

Instances

data Street t a Source

Instances

newtype Avenue'0 t a Source

Constructors

Avenue'0 (t, a) 

Instances

newtype Avenue'1 t a Source

Constructors

Avenue'1 (t, a) 

Instances

newtype Avenue'2 t a Source

Constructors

Avenue'2 (t, a) 

Instances

newtype Way'0 t a Source

Constructors

Way'0 (t, a) 

Instances

Bifunctor Way'0 Source 
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

Bifunctor Way'1 Source 
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

Bifunctor Way'2 Source 
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

Bifunctor Way Source 
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 

data Suffix t a Source

Instances

newtype City t a Source

Constructors

City (Words t a) 

Instances

Bifunctor City Source 
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

Bifunctor State Source 
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