Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Att = Att Symbol Type
- data Prod = Prd Symbol NT
- data Child = Chi Symbol Prod (Either NT T)
- data NT = NT Symbol
- data T = T Type
- prdFromChi :: Label (Chi nam prd tnt) -> Label prd
- type Record = Rec Reco
- data Reco
- type Tagged = TagField Reco
- pattern Tagged :: v -> Tagged l v
- type Attribution (attr :: [(Att, Type)]) = Rec AttReco attr
- data AttReco
- type Attribute (l :: Att) (v :: Type) = TagField AttReco l v
- pattern Attribute :: v -> TagField AttReco l v
- (=.) :: Label l -> v -> Attribute l v
- (*.) :: Require (OpExtend AttReco att val atts) (Text "" ': ([] :: [ErrorMessage])) => Attribute att val -> Attribution atts -> ReqR (OpExtend AttReco att val atts)
- emptyAtt :: Attribution '[]
- (#.) :: (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)
- type ChAttsRec prd (chs :: [(Child, [(Att, Type)])]) = Rec (ChiReco prd) chs
- data ChiReco (prd :: Prod)
- type TaggedChAttr prd = TagField (ChiReco prd)
- pattern TaggedChAttr :: Label l -> WrapField (ChiReco prd) v -> TaggedChAttr prd l v
- (.=) :: Label l -> WrapField (ChiReco prd) v -> TaggedChAttr prd l v
- (.*) :: Require (OpExtend (ChiReco prd) ch attrib attribs) (Text "" ': ([] :: [ErrorMessage])) => TaggedChAttr prd ch attrib -> ChAttsRec prd attribs -> ReqR (OpExtend (ChiReco prd) ch attrib attribs)
- emptyCh :: ChAttsRec prd '[]
- unTaggedChAttr :: TaggedChAttr prd l v -> WrapField (ChiReco prd) v
- labelChAttr :: TaggedChAttr prd l a -> Label l
- (.#) :: (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)
- data PrdReco
- type Aspect (asp :: [(Prod, Type)]) = Rec PrdReco asp
Documentation
index type
Instances
type ShowRec Reco Source # | Type level show utilities |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField Reco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField Reco (v :: Type) Source # | field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
Constructors
type Attribution (attr :: [(Att, Type)]) = Rec AttReco attr Source #
- Attribution | An attribution is a record constructed from attributes
datatype implementation
index type
Instances
type ShowRec AttReco Source # | type level utilities |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField AttReco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField AttReco (v :: Type) Source # | field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
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
Constructors
(*.) :: Require (OpExtend AttReco att val atts) (Text "" ': ([] :: [ErrorMessage])) => Attribute att val -> Attribution atts -> ReqR (OpExtend AttReco att val atts) infixr 2 Source #
Extending
emptyAtt :: Attribution '[] Source #
Empty
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 |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField (ChiReco a) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source # | Field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
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
Destructors
unTaggedChAttr :: TaggedChAttr prd l v -> WrapField (ChiReco prd) v Source #
labelChAttr :: TaggedChAttr prd l a -> Label l Source #
(.#) :: (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 #