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

Safe HaskellSafe
LanguageHaskell2010

Language.Grammars.AspectAG.RecordInstances

Contents

Synopsis

Documentation

data Att Source #

Constructors

Att Symbol Type 
Instances
type ShowTE (Att l t :: Att) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowTE (Att l t :: Att) = ((Text "Attribute " :<>: Text l) :<>: Text ":") :<>: ShowTE t
type Cmp (Att a _1 :: Att) (Att b _2 :: Att) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type Cmp (Att a _1 :: Att) (Att b _2 :: Att) = CmpSymbol a b
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source #

Field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) = Attribution v

data Prod Source #

Constructors

Prd Symbol NT 
Instances
type ShowTE (Prd l nt :: Prod) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowTE (Prd l nt :: Prod) = (ShowTE nt :<>: Text "::Production ") :<>: Text l
type Cmp (Prd a _1 :: Prod) (Prd b _2 :: Prod) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type Cmp (Prd a _1 :: Prod) (Prd b _2 :: Prod) = CmpSymbol a b

data Child Source #

Constructors

Chi Symbol Prod (Either NT T) 
Instances
type ShowTE (Chi l p s :: Child) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowTE (Chi l p s :: Child) = (((ShowTE p :<>: Text "::Child ") :<>: Text l) :<>: Text ":") :<>: ShowTE s
type Cmp (Chi a _1 _2 :: Child) (Chi b _3 _4 :: Child) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type Cmp (Chi a _1 _2 :: Child) (Chi b _3 _4 :: Child) = CmpSymbol a b

data NT Source #

Constructors

NT Symbol 
Instances
type ShowTE (NT l :: NT) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowTE (NT l :: NT) = Text "Non-Terminal " :<>: Text l

data T Source #

Constructors

T Type 
Instances
type ShowTE (T l :: T) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowTE (T l :: T) = Text "Terminal " :<>: ShowTE l

prdFromChi :: Label (Chi nam prd tnt) -> Label prd Source #

type Record = Rec Reco Source #

  • Records

datatype definition

data Reco Source #

index type

Instances
type ShowRec Reco Source #

Type level show utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec Reco = "Record"
type ShowField Reco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField Reco = "field named "
type WrapField Reco (v :: Type) Source #

field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField Reco (v :: Type) = v

pattern Tagged :: v -> Tagged l v Source #

Constructors

type Attribution (attr :: [(Att, Type)]) = Rec AttReco attr Source #

  • Attribution | An attribution is a record constructed from attributes

datatype implementation

data AttReco Source #

index type

Instances
type ShowRec AttReco Source #

type level utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec AttReco = "Attribution"
type ShowField AttReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField AttReco = "attribute named "
type WrapField AttReco (v :: Type) Source #

field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField AttReco (v :: Type) = v

type Attribute (l :: Att) (v :: Type) = TagField AttReco l v Source #

Pattern Synonyms pattern EmptyAtt :: Attribution '[] pattern EmptyAtt = EmptyRec pattern ConsAtt :: LabelSet ( '(att, val) ': atts) => Attribute att val -> Attribution atts -> Attribution ( '(att,val) ': atts) pattern ConsAtt att atts = ConsRec att atts

Attribute

pattern Attribute :: v -> TagField AttReco l v Source #

Constructors

(=.) :: Label l -> v -> Attribute l v infixr 4 Source #

Apretty constructor for an attribute

(*.) :: Require (OpExtend AttReco att val atts) (Text "" ': ([] :: [ErrorMessage])) => Attribute att val -> Attribution atts -> ReqR (OpExtend AttReco att val atts) infixr 2 Source #

Extending

Destructors

(#.) :: (msg ~ '[(Text "looking up attribute " :<>: ShowTE l) :$$: (Text "on " :<>: ShowTE r)], Require (OpLookup AttReco l r) msg) => Attribution r -> Label l -> ReqR (OpLookup AttReco l r) infixl 7 Source #

Children

type ChAttsRec prd (chs :: [(Child, [(Att, Type)])]) = Rec (ChiReco prd) chs Source #

operations for the children

datatype implementation

data ChiReco (prd :: Prod) Source #

index type

Instances
type ShowRec (ChiReco a) Source #

Type level Show utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec (ChiReco a) = "Children Map"
type ShowField (ChiReco a) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField (ChiReco a) = "child labelled "
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source #

Field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) = Attribution v

Pattern synonyms

type TaggedChAttr prd = TagField (ChiReco prd) Source #

since now we implement ChAttsRec as a generic record, this allows us to recover pattern matching pattern EmptyCh :: ChAttsRec prd '[] pattern EmptyCh = EmptyRec pattern ConsCh :: (LabelSet ( '( 'Chi ch prd nt, v) ': xs)) => TaggedChAttr prd ( 'Chi ch prd nt) v -> ChAttsRec prd xs -> ChAttsRec prd ( '( 'Chi ch prd nt,v) ': xs) pattern ConsCh h t = ConsRec h t

Attributions tagged by a child

pattern TaggedChAttr :: Label l -> WrapField (ChiReco prd) v -> TaggedChAttr prd l v Source #

Constructors

(.=) :: Label l -> WrapField (ChiReco prd) v -> TaggedChAttr prd l v infixr 4 Source #

Pretty constructor for tagging a child

(.*) :: Require (OpExtend (ChiReco prd) ch attrib attribs) (Text "" ': ([] :: [ErrorMessage])) => TaggedChAttr prd ch attrib -> ChAttsRec prd attribs -> ReqR (OpExtend (ChiReco prd) ch attrib attribs) infixr 2 Source #

Pretty constructors

emptyCh :: ChAttsRec prd '[] Source #

empty

Destructors

(.#) :: (c ~ Chi ch prd nt, ctx ~ '[((Text "looking up " :<>: ShowTE c) :$$: (Text "on " :<>: ShowTE r)) :$$: (Text "producion: " :<>: ShowTE prd)], Require (OpLookup (ChiReco prd) c r) ctx) => Rec (ChiReco prd) r -> Label c -> ReqR (OpLookup (ChiReco prd) c r) infixl 8 Source #

Productions

data PrdReco Source #

Instances
type ShowRec PrdReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec PrdReco = "Aspect"
type ShowField PrdReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField PrdReco = "production named "
type WrapField PrdReco (rule :: Type) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField PrdReco (rule :: Type) = rule

type Aspect (asp :: [(Prod, Type)]) = Rec PrdReco asp Source #