murder-1.3.4: MUtually Recursive Definitions Explicitly Represented

Safe HaskellNone

Language.Grammars.Murder

Documentation

type ExtGram env start nts = PreGramTrafo env () (Export start nts env)Source

type GramExt env start nts start' nts' = PreGramTrafo env (Export start nts env) (Export start' nts' env)Source

data Export start nts env Source

Constructors

Export (Symbol start TNonT env) (nts env) 

Instances

GetNTLabel nt (nts env) (Symbol a TNonT env) (nts env) => GetNT nt (Export start nts env) (Symbol a TNonT env) 

mapNTProd :: Symbol b TNonT env -> Symbol b TNonT env -> Prod TL a env -> Prod TL a envSource

closeGram :: (forall env. ExtGram env a nts) -> Grammar aSource

extendGram :: (NTRecord (nts env), NTRecord (nts' env)) => ExtGram env start nts -> GramExt env start nts start' nts' -> ExtGram env start' nts'Source

(+>>) :: (NTRecord (nts env), NTRecord (nts' env)) => ExtGram env start nts -> GramExt env start nts start' nts' -> ExtGram env start' nts'Source

exportNTs :: NTRecord (nts env) => PreGramTrafo env (Export start nts env) (Export start nts env)Source

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

data NTCons nt v l env Source

Constructors

NTCons (LSPair nt v TNonT env) (l env) 

Instances

GetNTLabel nt1 (l env) r (tenv env) => GetNTBool HFalse nt1 (NTCons nt2 v l env) r (tenv env) 
GetNTBool HTrue nt1 (NTCons nt1 v l env) (Symbol v TNonT env) (tenv env) 
NotDuplicated nt1 (l env) => NotDuplicated nt1 (NTCons nt2 v l env) 
Fail (Duplicated nt) => NotDuplicated nt (NTCons nt v l env) 
(TypeEq nt1 nt2 b, GetNTBool b nt1 (NTCons nt2 v l env) r (tenv env)) => GetNTLabel nt1 (NTCons nt2 v l env) r (tenv env) 
(NTRecord (l env), NotDuplicated nt (l env)) => NTRecord (NTCons nt v l env) 

data NTNil env Source

Constructors

NTNil 

Instances

NotDuplicated nt (NTNil env) 
Fail (NotFound nt (tenv env)) => GetNTLabel nt (NTNil env) r (tenv env) 
NTRecord (NTNil env) 

class NTRecord r Source

Instances

NTRecord (NTNil env) 
(NTRecord (l env), NotDuplicated nt (l env)) => NTRecord (NTCons nt v l env) 

class Fail err Source

class NotDuplicated nt r Source

Instances

NotDuplicated nt (NTNil env) 
NotDuplicated nt1 (l env) => NotDuplicated nt1 (NTCons nt2 v l env) 
Fail (Duplicated nt) => NotDuplicated nt (NTCons nt v l env) 

(^|) :: NTRecord (NTCons nt a l env) => LSPair nt a TNonT env -> l env -> NTCons nt a l envSource

class TypeEq x y b | x y -> bSource

Instances

~ * HFalse b => TypeEq x y b 
TypeEq x x HTrue 

data HTrue Source

Instances

TypeEq x x HTrue 
GetNTBool HTrue nt1 (NTCons nt1 v l env) (Symbol v TNonT env) (tenv env) 

data HFalse Source

Instances

GetNTLabel nt1 (l env) r (tenv env) => GetNTBool HFalse nt1 (NTCons nt2 v l env) r (tenv env) 

typeEq :: TypeEq x y b => x -> y -> bSource

class GetNT nt r v | nt r -> v whereSource

Methods

getNT :: nt -> r -> vSource

Instances

GetNTLabel nt (nts env) (Symbol a TNonT env) (nts env) => GetNT nt (Export start nts env) (Symbol a TNonT env) 

class GetNTLabel nt r v tenv | nt r -> v whereSource

Methods

getNTLabel :: tenv -> nt -> r -> vSource

Instances

Fail (NotFound nt (tenv env)) => GetNTLabel nt (NTNil env) r (tenv env) 
(TypeEq nt1 nt2 b, GetNTBool b nt1 (NTCons nt2 v l env) r (tenv env)) => GetNTLabel nt1 (NTCons nt2 v l env) r (tenv env) 

class GetNTBool b nt r v tenv | b nt r -> v whereSource

Methods

getNTBool :: b -> tenv -> nt -> r -> vSource

Instances

GetNTLabel nt1 (l env) r (tenv env) => GetNTBool HFalse nt1 (NTCons nt2 v l env) r (tenv env) 
GetNTBool HTrue nt1 (NTCons nt1 v l env) (Symbol v TNonT env) (tenv env) 

data NotFound nt tenv Source

getStart :: Export start nts env -> Symbol start TNonT envSource

exportList :: Symbol start TNonT env -> (NTNil env -> nts env) -> Export start nts envSource

export :: (NTRecord (l env), NotDuplicated nt (l env)) => nt -> Symbol a TNonT env -> l env -> NTCons nt a l envSource

extendExport :: Export start t env -> (t env -> nts env) -> Export start nts envSource