Safe Haskell | Safe-Inferred |
---|---|
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
- (*.) :: forall (att :: Att) val (atts :: [(Att, Type)]). Require (OpExtend AttReco att val atts) '['Text ""] => 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
- (.*) :: forall (prd :: Prod) (ch :: Child) (attrib :: [(Att, Type)]) (attribs :: [(Child, [(Att, Type)])]). Require (OpExtend (ChiReco prd) ch attrib attribs) '['Text ""] => 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
Instances
OrdType Att Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type UnWrap (Attribution r) Source # | |
Defined in Language.Grammars.AspectAG | |
type UnWrap (Rec c r) Source # | |
Defined in Language.Grammars.AspectAG | |
type ShowTE ('Att l t :: Att) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances type ShowTE ('Att l t :: Att) = 'Text (AppendSymbol (AppendSymbol (AppendSymbol (AppendSymbol "(" l) ":") (FromEM (ShowTE t))) ")") | |
type Cmp ('Att a _1 :: Att) ('Att b _2 :: Att) Source # | |
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source # | Field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
Instances
OrdType Prod Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowTE ('Prd l nt :: Prod) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances type ShowTE ('Prd l nt :: Prod) = 'Text (AppendSymbol (AppendSymbol (AppendSymbol (AppendSymbol "(" l) " of ") (FromEM (ShowTE nt))) ")") | |
type Cmp ('Prd a _1 :: Prod) ('Prd b _2 :: Prod) Source # | |
Instances
OrdType Child Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowTE ('Chi l p s :: Child) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances type ShowTE ('Chi l p s :: Child) = 'Text (AppendSymbol (AppendSymbol (AppendSymbol "Child " l) " of producion ") (FromEM (ShowTE p))) | |
type Cmp ('Chi a _1 _2 :: Child) ('Chi b _3 _4 :: Child) Source # | |
index type
Instances
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 UnWrap (Attribution r) Source # | |
Defined in Language.Grammars.AspectAG | |
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
(*.) :: forall (att :: Att) val (atts :: [(Att, Type)]). Require (OpExtend AttReco att val atts) '['Text ""] => 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
(.*) :: forall (prd :: Prod) (ch :: Child) (attrib :: [(Att, Type)]) (attribs :: [(Child, [(Att, Type)])]). Require (OpExtend (ChiReco prd) ch attrib attribs) '['Text ""] => 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 #