AspectAG-0.5.0.0: Strongly typed Attribute Grammars implemented using type-level programming.

Copyright(c) Juan García Garland Marcos Viera 2019
LicenseGPL
Maintainerjpgarcia@fing.edu.uy
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Language.Grammars.AspectAG

Description

 
Synopsis

Documentation

class Use' (mnts :: Bool) (att :: Att) (prd :: Prod) (nts :: [NT]) (a :: Type) sc where Source #

Methods

usechi' :: Proxy mnts -> Label att -> Label prd -> KList nts -> (a -> a -> a) -> ChAttsRec prd sc -> Maybe a Source #

Instances
(LabelSet ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs), Use att prd nts a cs) => Use' False att prd nts a ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Methods

usechi' :: Proxy False -> Label att -> Label prd -> KList nts -> (a -> a -> a) -> ChAttsRec prd ((Chi ch prd (Left nt), attr) ': cs) -> Maybe a Source #

(Require (OpLookup AttReco att attr) (((Text "looking up attribute " :<>: ShowT att) :$$: (Text "on " :<>: ShowT attr)) ': ([] :: [ErrorMessage])), ReqR (OpLookup AttReco att attr) ~ a, Use att prd nts a cs, LabelSet ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs), WrapField (ChiReco prd) attr ~ Attribution attr) => Use' True att prd nts a ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Methods

usechi' :: Proxy True -> Label att -> Label prd -> KList nts -> (a -> a -> a) -> ChAttsRec prd ((Chi ch prd (Left nt), attr) ': cs) -> Maybe a Source #

class Use (att :: Att) (prd :: Prod) (nts :: [NT]) (a :: Type) sc where Source #

Methods

usechi :: Label att -> Label prd -> KList nts -> (a -> a -> a) -> ChAttsRec prd sc -> Maybe a Source #

Instances
Use prd att nts a ([] :: [(Child, [(Att, Type)])]) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Methods

usechi :: Label prd -> Label att -> KList nts -> (a -> a -> a) -> ChAttsRec att [] -> Maybe a Source #

(HMember' nt nts, HMemberRes' nt nts ~ mnts, Use' mnts att prd nts a ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs)) => Use att prd nts a ((,) (Chi ch prd (Left nt :: Either NT T)) attr ': cs) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Methods

usechi :: Label att -> Label prd -> KList nts -> (a -> a -> a) -> ChAttsRec prd ((Chi ch prd (Left nt), attr) ': cs) -> Maybe a Source #

class Empties (fc :: [(Child, Type)]) (prd :: Prod) where Source #

Associated Types

type EmptiesR fc :: [(Child, [(Att, Type)])] Source #

Methods

empties :: Record fc -> ChAttsRec prd (EmptiesR fc) Source #

Instances
Empties ([] :: [(Child, Type)]) prd Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type EmptiesR [] :: [(Child, [(Att, Type)])] Source #

Methods

empties :: Record [] -> ChAttsRec prd (EmptiesR []) Source #

(Empties fcr prd, chi ~ Chi ch prd nt, LabelSet ((,) chi ([] :: [(Att, Type)]) ': EmptiesR fcr)) => Empties ((,) chi (Attribution e -> Attribution a) ': fcr) prd Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type EmptiesR ((chi, Attribution e -> Attribution a) ': fcr) :: [(Child, [(Att, Type)])] Source #

Methods

empties :: Record ((chi, Attribution e -> Attribution a) ': fcr) -> ChAttsRec prd (EmptiesR ((chi, Attribution e -> Attribution a) ': fcr)) Source #

class Kn (fcr :: [(Child, Type)]) (prd :: Prod) where Source #

Associated Types

type ICh fcr :: [(Child, [(Att, Type)])] Source #

type SCh fcr :: [(Child, [(Att, Type)])] Source #

Methods

kn :: Record fcr -> ChAttsRec prd (ICh fcr) -> ChAttsRec prd (SCh fcr) Source #

Instances
Kn ([] :: [(Child, Type)]) prod Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ICh [] :: [(Child, [(Att, Type)])] Source #

type SCh [] :: [(Child, [(Att, Type)])] Source #

Methods

kn :: Record [] -> ChAttsRec prod (ICh []) -> ChAttsRec prod (SCh []) Source #

(lch ~ Chi l prd nt, Kn fc prd, LabelSet ((,) lch sch ': SCh fc), LabelSet ((,) lch ich ': ICh fc)) => Kn ((,) lch (Attribution ich -> Attribution sch) ': fc) prd Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ICh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source #

type SCh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source #

Methods

kn :: Record ((lch, Attribution ich -> Attribution sch) ': fc) -> ChAttsRec prd (ICh ((lch, Attribution ich -> Attribution sch) ': fc)) -> ChAttsRec prd (SCh ((lch, Attribution ich -> Attribution sch) ': fc)) Source #

class At pos att m where Source #

Associated Types

type ResAt pos att m Source #

Methods

at :: Label pos -> Label att -> m (ResAt pos att m) Source #

Instances
(RequireR (OpLookup (ChiReco prd) (Chi ch prd nt) chi) ctx (Attribution r), RequireR (OpLookup AttReco (Att att t) r) ctx t', RequireEq prd prd' ctx, RequireEq t t' ctx, RequireEq (Chi ch prd nt) (Chi ch prd (Left (NT n) :: Either NT T)) ctx) => At (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResAt (Chi ch prd nt) (Att att t) (Reader (Proxy ctx, Fam prd' chi par)) :: Type Source #

Methods

at :: Label (Chi ch prd nt) -> Label (Att att t) -> Reader (Proxy ctx, Fam prd' chi par) (ResAt (Chi ch prd nt) (Att att t) (Reader (Proxy ctx, Fam prd' chi par))) Source #

(RequireR (OpLookup AttReco (Att att t) par) ctx t', RequireEq t t' ctx) => At Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par)) :: Type Source #

Methods

at :: Label Lhs -> Label (Att att t) -> Reader (Proxy ctx, Fam prd chi par) (ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par))) Source #

data Lhs Source #

Instances
(RequireR (OpLookup AttReco (Att att t) par) ctx t', RequireEq t t' ctx) => At Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par)) :: Type Source #

Methods

at :: Label Lhs -> Label (Att att t) -> Reader (Proxy ctx, Fam prd chi par) (ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par))) Source #

type ResAt Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ResAt Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) = t

type family SP (rule :: Type) where ... Source #

Equations

SP (Rule prd sc ip ic sp ic' sp') = sp 
SP (CRule ctx prd sc ip ic sp ic' sp') = sp 

type family IC (rule :: Type) where ... Source #

Equations

IC (Rule prd sc ip ic sp ic' sp') = ic 
IC (CRule ctx prd sc ip ic sp ic' sp') = ic 

data OpComRA' (b :: Bool) (ctx :: [ErrorMessage]) (prd :: Prod) (sc :: [(Child, [(Att, Type)])]) (ip :: [(Att, Type)]) (ic :: [(Child, [(Att, Type)])]) (sp :: [(Att, Type)]) (ic' :: [(Child, [(Att, Type)])]) (sp' :: [(Att, Type)]) (a :: [(Prod, Type)]) where Source #

Constructors

OpComRA' :: Proxy b -> CRule ctx prd sc ip ic sp ic' sp' -> Aspect a -> OpComRA' b ctx prd sc ip ic sp ic' sp' a 
Instances
Require (OpExtend PrdReco prd (CRule ctx prd sc ip ic sp ic' sp') a) ctx => Require (OpComRA' False ctx prd sc ip ic sp ic' sp' a) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComRA' False ctx prd sc ip ic sp ic' sp' a) :: Type Source #

Methods

req :: Proxy ctx -> OpComRA' False ctx prd sc ip ic sp ic' sp' a -> ReqR (OpComRA' False ctx prd sc ip ic sp ic' sp' a) Source #

(Require (OpUpdate PrdReco prd (CRule ctx prd sc ip ic sp ic'' sp'') a) ctx, RequireR (OpLookup PrdReco prd a) ctx (CRule ctx prd sc ip ic sp ic' sp'), IC (ReqR (OpLookup PrdReco prd a)) ~ ic, SP (ReqR (OpLookup PrdReco prd a)) ~ sp) => Require (OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a) :: Type Source #

Methods

req :: Proxy ctx -> OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a -> ReqR (OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a) Source #

type ReqR (OpComRA' False ctx prd sc ip ic sp ic' sp' a) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComRA' False ctx prd sc ip ic sp ic' sp' a) = ReqR (OpExtend PrdReco prd (CRule ctx prd sc ip ic sp ic' sp') a)
type ReqR (OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComRA' True ctx prd sc ip ic' sp' ic'' sp'' a) = ReqR (OpUpdate PrdReco prd (CRule ctx prd sc ip (IC (ReqR (OpLookup PrdReco prd a))) (SP (ReqR (OpLookup PrdReco prd a))) ic'' sp'') a)

data OpComRA (ctx :: [ErrorMessage]) (prd :: Prod) (sc :: [(Child, [(Att, Type)])]) (ip :: [(Att, Type)]) (ic :: [(Child, [(Att, Type)])]) (sp :: [(Att, Type)]) (ic' :: [(Child, [(Att, Type)])]) (sp' :: [(Att, Type)]) (a :: [(Prod, Type)]) where Source #

Constructors

OpComRA :: CRule ctx prd sc ip ic sp ic' sp' -> Aspect a -> OpComRA ctx prd sc ip ic sp ic' sp' a 
Instances
Require (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a) ctx => Require (OpComRA ctx prd sc ip ic sp ic' sp' a) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComRA ctx prd sc ip ic sp ic' sp' a) :: Type Source #

Methods

req :: Proxy ctx -> OpComRA ctx prd sc ip ic sp ic' sp' a -> ReqR (OpComRA ctx prd sc ip ic sp ic' sp' a) Source #

type ReqR (OpComRA ctx prd sc ip ic sp ic' sp' a) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComRA ctx prd sc ip ic sp ic' sp' a) = ReqR (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a)

data OpComAsp (al :: [(Prod, Type)]) (ar :: [(Prod, Type)]) where Source #

Constructors

OpComAsp :: Aspect al -> Aspect ar -> OpComAsp al ar 
Instances
(RequireR (OpComAsp al ar) ctx (Aspect ar'), Require (OpComRA ctx prd sc ip ic sp ic' sp' ar') ctx) => Require (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar)) :: Type Source #

Methods

req :: Proxy ctx -> OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar) -> ReqR (OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar)) Source #

Require (OpComAsp al ([] :: [(Prod, Type)])) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComAsp al []) :: Type Source #

Methods

req :: Proxy ctx -> OpComAsp al [] -> ReqR (OpComAsp al []) Source #

type ReqR (OpComAsp al ([] :: [(Prod, Type)])) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComAsp al ([] :: [(Prod, Type)])) = Aspect al
type ReqR (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) = ReqR (OpComRA ctx prd sc ip ic sp ic' sp' (UnWrap (ReqR (OpComAsp al ar)) :: [(Prod, Type)]))

class MapCtxAsp (r :: [(Prod, Type)]) (ctx :: [ErrorMessage]) (ctx' :: [ErrorMessage]) where Source #

Associated Types

type ResMapCtx r ctx ctx' :: [(Prod, Type)] Source #

Methods

mapCtxRec :: (Proxy ctx -> Proxy ctx') -> Aspect r -> Aspect (ResMapCtx r ctx ctx') Source #

Instances
MapCtxAsp ([] :: [(Prod, Type)]) ctx ctx' Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResMapCtx [] ctx ctx' :: [(Prod, Type)] Source #

Methods

mapCtxRec :: (Proxy ctx -> Proxy ctx') -> Aspect [] -> Aspect (ResMapCtx [] ctx ctx') Source #

(MapCtxAsp r ctx ctx', ResMapCtx r ctx ctx' ~ r', LabelSetF ((,) l (CRule ctx prd sc ip ic sp ic' sp') ': r') ~ True) => MapCtxAsp ((,) l (CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResMapCtx ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' :: [(Prod, Type)] Source #

Methods

mapCtxRec :: (Proxy ctx -> Proxy ctx') -> Aspect ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) -> Aspect (ResMapCtx ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx') Source #

newtype CAspect (ctx :: [ErrorMessage]) (asp :: [(Prod, Type)]) Source #

Context tagged aspects.

Constructors

CAspect 

Fields

newtype CRule (ctx :: [ErrorMessage]) prd sc ip ic sp ic' sp' Source #

Rules with context.

Constructors

CRule 

Fields

Instances
(RequireR (OpComAsp al ar) ctx (Aspect ar'), Require (OpComRA ctx prd sc ip ic sp ic' sp' ar') ctx) => Require (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ReqR (OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar)) :: Type Source #

Methods

req :: Proxy ctx -> OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar) -> ReqR (OpComAsp al ((prd, CRule ctx prd sc ip ic sp ic' sp') ': ar)) Source #

(MapCtxAsp r ctx ctx', ResMapCtx r ctx ctx' ~ r', LabelSetF ((,) l (CRule ctx prd sc ip ic sp ic' sp') ': r') ~ True) => MapCtxAsp ((,) l (CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResMapCtx ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' :: [(Prod, Type)] Source #

Methods

mapCtxRec :: (Proxy ctx -> Proxy ctx') -> Aspect ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) -> Aspect (ResMapCtx ((l, CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx') Source #

type ReqR (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ReqR (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) = ReqR (OpComRA ctx prd sc ip ic sp ic' sp' (UnWrap (ReqR (OpComAsp al ar)) :: [(Prod, Type)]))
type ResMapCtx ((,) l (CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ResMapCtx ((,) l (CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' = (,) l (CRule ctx prd sc ip ic sp ic' sp') ': ResMapCtx r ctx ctx'

type Rule (prd :: Prod) (sc :: [(Child, [(Att, Type)])]) (ip :: [(Att, Type)]) (ic :: [(Child, [(Att, Type)])]) (sp :: [(Att, Type)]) (ic' :: [(Child, [(Att, Type)])]) (sp' :: [(Att, Type)]) = Fam prd sc ip -> Fam prd ic sp -> Fam prd ic' sp' Source #

Rules are a function from the input family to the output family. They are indexed by a production.

data Fam (prd :: Prod) (c :: [(Child, [(Att, Type)])]) (p :: [(Att, Type)]) :: Type where Source #

In each node of the grammar, the Fam contains a single attribution for the parent, and a collection (Record) of attributions for the children:

Constructors

Fam :: ChAttsRec prd c -> Attribution p -> Fam prd c p 
Instances
(RequireR (OpLookup (ChiReco prd) (Chi ch prd nt) chi) ctx (Attribution r), RequireR (OpLookup AttReco (Att att t) r) ctx t', RequireEq prd prd' ctx, RequireEq t t' ctx, RequireEq (Chi ch prd nt) (Chi ch prd (Left (NT n) :: Either NT T)) ctx) => At (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResAt (Chi ch prd nt) (Att att t) (Reader (Proxy ctx, Fam prd' chi par)) :: Type Source #

Methods

at :: Label (Chi ch prd nt) -> Label (Att att t) -> Reader (Proxy ctx, Fam prd' chi par) (ResAt (Chi ch prd nt) (Att att t) (Reader (Proxy ctx, Fam prd' chi par))) Source #

(RequireR (OpLookup AttReco (Att att t) par) ctx t', RequireEq t t' ctx) => At Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

Associated Types

type ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par)) :: Type Source #

Methods

at :: Label Lhs -> Label (Att att t) -> Reader (Proxy ctx, Fam prd chi par) (ResAt Lhs (Att att t) (Reader (Proxy ctx, Fam prd chi par))) Source #

type ResAt (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ResAt (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) = t
type ResAt Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type ResAt Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) = t

class SemLit a where Source #

Methods

sem_Lit :: a -> Attribution ('[] :: [(Att, Type)]) -> Attribution '['(Att "term" a, a)] Source #

lit :: Label (Att "term" a) Source #

Instances
SemLit a Source # 
Instance details

Defined in Language.Grammars.AspectAG

Methods

sem_Lit :: a -> Attribution [] -> Attribution ((Att "term" a, a) ': []) Source #

lit :: Label (Att "term" a) Source #

chi :: Fam prd c p -> ChAttsRec prd c Source #

Getters

par :: Fam prd c p -> Attribution p Source #

prd :: Fam prd c p -> Label prd Source #

emptyAspect :: CAspect ctx '[] Source #

Empty Aspect.

comAspect :: (Require (OpComAsp al ar) ctx, ReqR (OpComAsp al ar) ~ Aspect asp) => CAspect ctx al -> CAspect ctx ar -> CAspect ctx asp Source #

combination of Aspects

traceAspect :: MapCtxAsp r ctx ((Text "aspect " :<>: e) ': ctx) => Proxy e -> CAspect ((Text "aspect " :<>: e) ': ctx) r -> CAspect ctx (ResMapCtx r ctx ((Text "aspect " :<>: e) ': ctx)) Source #

|traceAspect| adds context to an aspect.

traceRule :: Proxy e -> CRule ((Text "rule " :<>: e) ': ctx) prd sc ip ic sp ic' sp' -> CRule ctx prd sc ip ic sp ic' sp' Source #

mapCRule :: (Proxy ctx -> Proxy ctx') -> CRule ctx' prd sc ip ic sp ic' sp' -> CRule ctx prd sc ip ic sp ic' sp' Source #

mapCAspect :: MapCtxAsp r ctx1 ctx2 => (Proxy ctx1 -> Proxy ctx2) -> CAspect ctx2 r -> CAspect ctx1 (ResMapCtx r ctx1 ctx2) Source #

extAspect :: RequireR (OpComRA ctx prd sc ip ic sp ic' sp' a) ctx (Aspect asp) => CRule ctx prd sc ip ic sp ic' sp' -> CAspect ctx a -> CAspect ctx asp Source #

(.+:) :: (Require (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a) ctx, ReqR (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a) ~# Rec PrdReco asp) => CRule ctx prd sc ip ic sp ic' sp' -> CAspect ctx a -> CAspect ctx asp infixr 3 Source #

(.:+.) :: (Require (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a) ctx, ReqR (OpComRA' (HasLabel prd a) ctx prd sc ip ic sp ic' sp' a) ~# Rec PrdReco asp) => CAspect ctx a -> CRule ctx prd sc ip ic sp ic' sp' -> CAspect ctx asp infixl 3 Source #

(.:+:) :: (Require (OpComAsp al ar) ctx, ReqR (OpComAsp al ar) ~# Rec PrdReco asp) => CAspect ctx al -> CAspect ctx ar -> CAspect ctx asp infixr 4 Source #

syndef :: (RequireEq t t' ctx', RequireR (OpExtend AttReco (Att att t) t sp) ctx (Attribution sp'), ctx' ~ (((((Text "syndef(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT prd) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label prd -> (Proxy ctx' -> Fam prd sc ip -> t') -> CRule ctx prd sc ip ic sp ic sp' Source #

syndefM :: (RequireEq t t' ctx', RequireR (OpExtend AttReco (Att att t) t sp) ctx (Attribution sp'), ctx' ~ (((((Text "syndef(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT prd) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label prd -> Reader (Proxy ctx', Fam prd sc ip) t' -> CRule ctx prd sc ip ic sp ic sp' Source #

syn :: (Require (OpExtend' (LabelSetF ((,) (Att att t') t' ': sp)) AttReco (Att att t') t' sp) ctx, ReqR (OpExtend' (LabelSetF ((,) (Att att t') t' ': sp)) AttReco (Att att t') t' sp) ~# Rec AttReco sp') => Label (Att att t') -> Label prd -> Reader (Proxy (((((Text "syndef(" :<>: (((Text "Attribute " :<>: Text att) :<>: Text ":") :<>: ShowType t')) :<>: Text ", ") :<>: ShowT prd) :<>: Text ")") ': ctx), Fam prd sc ip) t' -> CRule ctx prd sc ip ic sp ic sp' Source #

inh :: (Require (OpExtend' (LabelSetF ((,) (Att att t') t' ': r)) AttReco (Att att t') t' r) ctx, Require (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) (Left n :: Either NT T)) v2 ic) ctx, Require (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) (Left n :: Either NT T)) ic) ctx, ReqR (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) (Left n :: Either NT T)) ic) ~# Rec AttReco r, ReqR (OpExtend' (LabelSetF ((,) (Att att t') t' ': r)) AttReco (Att att t') t' r) ~# Rec AttReco v2, ReqR (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) (Left n :: Either NT T)) v2 ic) ~# Rec (ChiReco (Prd prd nt)) ic') => Label (Att att t') -> Label (Prd prd nt) -> Label (Chi chi (Prd prd nt) (Left n :: Either NT T)) -> Reader (Proxy (((((((Text "inhdef(" :<>: (((Text "Attribute " :<>: Text att) :<>: Text ":") :<>: ShowType t')) :<>: Text ", ") :<>: ((ShowT nt :<>: Text "::Production ") :<>: Text prd)) :<>: Text ", ") :<>: ((((((ShowT nt :<>: Text "::Production ") :<>: Text prd) :<>: Text "::Child ") :<>: Text chi) :<>: Text ":") :<>: ShowT n)) :<>: Text ")") ': ctx), Fam (Prd prd nt) sc ip) t' -> CRule ctx (Prd prd nt) sc ip ic sp ic' sp Source #

synmod :: RequireR (OpUpdate AttReco (Att att t) t r) ctx (Attribution sp') => Label (Att att t) -> Label prd -> (Proxy (((((Text "synmod(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT prd) :<>: Text ")") ': ctx) -> Fam prd sc ip -> t) -> CRule ctx prd sc ip ic' r ic' sp' Source #

synmodM :: RequireR (OpUpdate AttReco (Att att t) t r) ctx (Attribution sp') => Label (Att att t) -> Label prd -> Reader (Proxy (((((Text "synmod(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT prd) :<>: Text ")") ': ctx), Fam prd sc ip) t -> CRule ctx prd sc ip ic' r ic' sp' Source #

inhdef :: (RequireEq t t' ctx', RequireR (OpExtend AttReco (Att att t) t r) ctx (Attribution v2), RequireR (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) v2 ic) ctx (ChAttsRec (Prd prd nt) ic'), RequireR (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) ic) ctx (Attribution r), RequireEq ntch (Left n) ctx', ctx' ~ (((((((Text "inhdef(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT (Prd prd nt)) :<>: Text ", ") :<>: ShowT (Chi chi (Prd prd nt) ntch)) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label (Prd prd nt) -> Label (Chi chi (Prd prd nt) ntch) -> (Proxy ctx' -> Fam (Prd prd nt) sc ip -> t') -> CRule ctx (Prd prd nt) sc ip ic sp ic' sp Source #

inhdefM :: (RequireEq t t' ctx', RequireR (OpExtend' (LabelSetF ('(Att att t, t) ': r)) AttReco (Att att t) t r) ctx (Attribution v2), RequireR (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) v2 ic) ctx (ChAttsRec (Prd prd nt) ic'), RequireR (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) ic) ctx (Attribution r), RequireEq ntch (Left n) ctx', ctx' ~ (((((((Text "inhdef(" :<>: ShowT (Att att t')) :<>: Text ", ") :<>: ShowT (Prd prd nt)) :<>: Text ", ") :<>: ShowT (Chi chi (Prd prd nt) ntch)) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label (Prd prd nt) -> Label (Chi chi (Prd prd nt) ntch) -> Reader (Proxy ctx', Fam (Prd prd nt) sc ip) t' -> CRule ctx (Prd prd nt) sc ip ic sp ic' sp Source #

inhmod :: (RequireEq t t' ctx', RequireR (OpUpdate AttReco (Att att t) t r) ctx (Attribution v2), RequireR (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) v2 ic) ctx (ChAttsRec (Prd prd nt) ic'), RequireR (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) ic) ctx (Attribution r), RequireEq ntch (Left n) ctx', ctx' ~ (((((((Text "inhmod(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT (Prd prd nt)) :<>: Text ", ") :<>: ShowT (Chi chi (Prd prd nt) ntch)) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label (Prd prd nt) -> Label (Chi chi (Prd prd nt) ntch) -> (Proxy ctx' -> Fam (Prd prd nt) sc ip -> t') -> CRule ctx (Prd prd nt) sc ip ic sp ic' sp Source #

inhmodM :: (RequireEq t t' ctx', RequireR (OpUpdate AttReco (Att att t) t r) ctx (Attribution v2), RequireR (OpUpdate (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) v2 ic) ctx (ChAttsRec (Prd prd nt) ic'), RequireR (OpLookup (ChiReco (Prd prd nt)) (Chi chi (Prd prd nt) ntch) ic) ctx (Attribution r), RequireEq ntch (Left n) ctx', ctx' ~ (((((((Text "inhmod(" :<>: ShowT (Att att t)) :<>: Text ", ") :<>: ShowT (Prd prd nt)) :<>: Text ", ") :<>: ShowT (Chi chi (Prd prd nt) ntch)) :<>: Text ")") ': ctx)) => Label (Att att t) -> Label (Prd prd nt) -> Label (Chi chi (Prd prd nt) ntch) -> Reader (Proxy ctx', Fam (Prd prd nt) sc ip) t' -> CRule ctx (Prd prd nt) sc ip ic sp ic' sp Source #

ext' :: CRule ctx prd sc ip ic sp ic' sp' -> CRule ctx prd sc ip a b ic sp -> CRule ctx prd sc ip a b ic' sp' Source #

ext :: RequireEq prd prd' (Text "ext" ': ctx) => CRule ctx prd sc ip ic sp ic' sp' -> CRule ctx prd' sc ip a b ic sp -> CRule ctx prd sc ip a b ic' sp' Source #

(.+.) :: CRule ctx prd' sc ip ic sp ic' sp' -> CRule ctx prd' sc ip a b ic sp -> CRule ctx prd' sc ip a b ic' sp' infixr 6 Source #

def :: Reader (Proxy ctx, Fam prd chi par) a -> Proxy ctx -> Fam prd chi par -> a Source #

ter :: (RequireR (OpLookup (ChiReco prd) pos chi) ctx (Attribution r), RequireR (OpLookup AttReco (Att "term" t) r) ctx t', RequireEq prd prd' ctx, RequireEq t t' ctx, RequireEq pos (Chi ch prd (Right (T t))) ctx, m ~ Reader (Proxy ctx, Fam prd' chi par)) => Label pos -> m (ResAt pos (Att "term" t) m) Source #

emptyCtx :: Proxy ([] :: [k]) Source #

knit' :: (Kn fc prd, Empties fc prd) => CRule '[] prd (SCh fc) ip (EmptiesR fc) '[] (ICh fc) sp -> Record fc -> Attribution ip -> Attribution sp Source #

knit :: (Empties fc prd, Kn fc prd) => Proxy ctx -> CRule ctx prd (SCh fc) ip (EmptiesR fc) ([] :: [(Att, Type)]) (ICh fc) sp -> Record fc -> Attribution ip -> Attribution sp Source #

knitAspect :: (Empties fc prd1, Kn fc prd1, Require (OpLookup PrdReco prd2 r) ((Text "knit" :<>: ShowT prd2) ': ([] :: [ErrorMessage])), ReqR (OpLookup PrdReco prd2 r) ~# CRule ([] :: [ErrorMessage]) prd1 (SCh fc) ip (EmptiesR fc) ([] :: [(Att, Type)]) (ICh fc) sp) => Label prd2 -> CAspect ([] :: [ErrorMessage]) r -> Record fc -> Attribution ip -> Attribution sp Source #

use :: (Require (OpExtend' (LabelSetF ((,) (Att att t') t' ': sp)) AttReco (Att att t') t' sp) ctx, Use (Att att t') prd nts t' sc, ReqR (OpExtend' (LabelSetF ((,) (Att att t') t' ': sp)) AttReco (Att att t') t' sp) ~# Rec AttReco sp') => Label (Att att t') -> Label prd -> KList nts -> (t' -> t' -> t') -> t' -> CAspect ctx ((,) prd (CRule ctx prd sc ip ic' sp ic' sp') ': ([] :: [(Prod, Type)])) Source #

singAsp :: CRule ctx prd sc ip ic sp ic' sp' -> CAspect ctx ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ([] :: [(Prod, Type)])) Source #

tyAppAtt :: (forall b. Label (Att name b)) -> Proxy a -> Label (Att name a) Source #

tyAppChi :: (forall b. Label (Chi name prd b)) -> Proxy a -> Label (Chi name prd a) Source #