murder-1.1: MUtually Recursive Definitions Explicitly Represented

Safe HaskellNone

Language.Grammars.Grammar

Synopsis

Documentation

data TL Source

data FL a Source

data NF Source

data Grammar a Source

Constructors

forall env . Grammar (Ref a env) (FinalEnv (Productions NF) env) 

newtype Productions l a env Source

Constructors

PS 

Fields

unPS :: [Prod l a env]
 

data Prod l a env whereSource

Constructors

Star :: Prod l (a -> b) env -> Prod l a env -> Prod l b env 
FlipStar :: Prod NF a env -> Prod NF (a -> b) env -> Prod NF b env 
Sym :: Symbol a t env -> Prod l a env 
Pure :: a -> Prod l a env 
Fix :: Productions (FL a) a env -> Prod TL a env 
Var :: Prod (FL a) a env 

newtype PreProductions l env a Source

Constructors

PP 

Fields

unPP :: [Prod l a env]
 

Instances

Idiomatic l env x (Ii -> PreProductions l env x) 
Idiomatic l env f g => Idiomatic l env (a -> f) (PreProductions l env a -> g) 
Functor (PreProductions l env) 
Applicative (PreProductions l env) 
Alternative (PreProductions l env) 

data Pos Source

Instances

data DTerm a Source

Constructors

DTerm 

Fields

pos :: Pos
 
value :: a
 

Instances

Eq a => Eq (DTerm a) 
Show a => Show (DTerm a) 

data TTerm Source

Instances

data TNonT Source

Instances

LabelSymbol TNonT v v 
Idiomatic l env f g => Idiomatic l env (a -> f) (Symbol a TNonT env -> g) 
GetNTBool HTrue nt1 (NTCons nt1 v l env) (Symbol v TNonT env) (tenv env) 
GetNTLabel nt (nts env) (Symbol a TNonT env) (nts env) => GetNT nt (Export start nts env) (Symbol a TNonT env) 

data TAttT Source

Instances

LabelSymbol TAttT v (Record HNil -> v) 
Idiomatic l env f g => Idiomatic l env ((Record HNil -> a) -> f) (Symbol a TAttT env -> g) 

data Symbol a t env whereSource

Instances

Idiomatic l env f g => Idiomatic l env ((Record HNil -> a) -> f) (Symbol a TAttT env -> g) 
Idiomatic l env f g => Idiomatic l env (a -> f) (Symbol a TNonT env -> g) 
GetNTBool HTrue nt1 (NTCons nt1 v l env) (Symbol v TNonT env) (tenv env) 
GetNTLabel nt (nts env) (Symbol a TNonT env) (nts env) => GetNT nt (Export start nts env) (Symbol a TNonT env) 

getRefNT :: Symbol a TNonT env -> Ref a envSource

pairEq :: Maybe (Equal a b) -> Maybe (Equal (a, t) (b, t))Source

matchSym :: Symbol a t1 env -> Symbol b t2 env -> Maybe (Equal (a, t1) (b, t2))Source

sym :: Symbol a t env -> PreProductions l env aSource

nt :: Symbol a TNonT env -> PreProductions l env aSource

prod :: PreProductions l env a -> Productions l a envSource

pSome :: PreProductions (FL [a]) env a -> PreProductions TL env [a]Source

pMany :: PreProductions (FL [a]) env a -> PreProductions TL env [a]Source

opt :: PreProductions l env a -> a -> PreProductions l env aSource

pMaybe :: (b, a -> b) -> PreProductions TL env a -> PreProductions TL env bSource

pFoldr :: (a -> b -> b, b) -> PreProductions (FL b) env a -> PreProductions TL env bSource

data Ii Source

The Ii is to be pronounced as stop

Constructors

Ii 

Instances

Idiomatic l env x (Ii -> PreProductions l env x) 

iI :: Idiomatic l env (a -> a) g => gSource

The function iI is to be pronounced as start

class Idiomatic l env f g | g -> f l env whereSource

Methods

idiomatic :: PreProductions l env f -> gSource

Instances

Idiomatic l env f g => Idiomatic l env f (String -> g) 
Idiomatic l env x (Ii -> PreProductions l env x) 
Idiomatic l env f g => Idiomatic l env ((a -> b) -> f) ((a -> b) -> g) 
Idiomatic l env f g => Idiomatic l env ((Record HNil -> a) -> f) (Symbol a TAttT env -> g) 
Idiomatic l env f g => Idiomatic l env (a -> f) (Symbol a TNonT env -> g) 
Idiomatic l env f g => Idiomatic l env (a -> f) (PreProductions l env a -> g) 

newtype LSPair nt a t env Source

Constructors

LSPair 

Fields

symLSPair :: Symbol a t env
 

labelLSPair :: LSPair nt a t env -> ntSource

(^=) :: nt -> Symbol a t env -> LSPair nt a t envSource

class LabelSymbol t v v' | t v -> v' whereSource

Methods

(<=>) :: label -> Symbol v t env -> PreProductions l env (LVPair label v')Source