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
- type Record = Rec Reco
- data Reco
- pattern EmptyR :: Rec Reco '[]
- pattern ConsR :: LabelSet ('(l, v) ': xs) => Tagged l v -> Rec Reco xs -> Rec Reco ('(l, v) ': xs)
- type Tagged = TagField Reco
- pattern Tagged :: v -> Tagged l v
- (.=.) :: Label l -> v -> Tagged l v
- emptyRecord :: Record '[]
- unTagged :: Tagged l v -> v
- label :: Tagged l v -> Label l
- labelTChAtt :: Tagged l v -> Label l
- type Attribution (attr :: [(Att, Type)]) = Rec AttReco attr
- data AttReco
- pattern EmptyAtt :: Attribution '[]
- pattern ConsAtt :: LabelSet ('(att, val) ': atts) => Attribute att val -> Attribution atts -> Attribution ('(att, val) ': atts)
- type Attribute (l :: Att) (v :: Type) = TagField AttReco l v
- pattern Attribute :: v -> TagField AttReco l v
- (=.) :: Label l -> v -> Attribute l v
- (*.) :: LabelSet ('(att, val) ': atts) => Attribute att val -> Attribution atts -> Attribution ('(att, val) ': atts)
- emptyAtt :: Attribution '[]
- (#.) :: (msg ~ '[(Text "looking up attribute " :<>: ShowT l) :$$: (Text "on " :<>: ShowT 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)
- pattern EmptyCh :: ChAttsRec prd '[]
- 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)
- 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
- (.*) :: LabelSet ('(ch, attrib) ': attribs) => TaggedChAttr prd ch attrib -> ChAttsRec prd attribs -> ChAttsRec 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 " :<>: ShowT c) :$$: (Text "on " :<>: ShowT r)) :$$: (Text "producion: " :<>: ShowT 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
(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 # | |
(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 # | |
Use prd att nts a ([] :: [(Child, [(Att, Type)])]) 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 # | |
(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 # | |
Defined in Language.Grammars.AspectAG | |
(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 # | |
(Empties fcr prd, chi ~ Chi ch prd nt, LabelSet ((,) chi ([] :: [(Att, Type)]) ': EmptiesR fcr)) => Empties ((,) chi (Attribution e -> Attribution a) ': fcr) prd Source # | |
Defined in Language.Grammars.AspectAG type EmptiesR ((chi, Attribution e -> Attribution a) ': fcr) :: [(Child, [(Att, Type)])] Source # empties :: Record ((chi, Attribution e -> Attribution a) ': fcr) -> ChAttsRec prd (EmptiesR ((chi, Attribution e -> Attribution a) ': fcr)) 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 # | |
Defined in Language.Grammars.AspectAG type ICh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source # type SCh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source # 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 # | |
type ResAt (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) Source # | |
type ShowT (Att l t :: Att) Source # | |
type ResAt Lhs (Att att t :: Att) (Reader (Proxy ctx, Fam prd chi par)) Source # | |
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source # | Field type |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type EmptiesR ((,) chi (Attribution e -> Attribution a) ': fcr) Source # | |
Defined in Language.Grammars.AspectAG type EmptiesR ((,) chi (Attribution e -> Attribution a) ': fcr) = (,) chi ([] :: [(Att, Type)]) ': EmptiesR fcr | |
type ICh ((,) lch (Attribution ich -> Attribution sch) ': fc) Source # | |
Defined in Language.Grammars.AspectAG | |
type SCh ((,) lch (Attribution ich -> Attribution sch) ': fc) Source # | |
Defined in Language.Grammars.AspectAG |
Instances
MapCtxAsp ([] :: [(Prod, Type)]) ctx ctx' Source # | |
(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 # | |
Require (OpComAsp al ([] :: [(Prod, Type)])) 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 # | |
Defined in Language.Grammars.AspectAG | |
type ShowT (Prd l nt :: Prod) Source # | |
type ResMapCtx ([] :: [(Prod, Type)]) ctx ctx' Source # | |
type ReqR (OpComAsp al ([] :: [(Prod, Type)])) Source # | |
type ReqR (OpComAsp al ((,) prd (CRule ctx prd sc ip ic sp ic' sp') ': ar)) Source # | |
type ResMapCtx ((,) l (CRule ctx' prd sc ip ic sp ic' sp') ': r) ctx ctx' 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 # | |
(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 # | |
Use prd att nts a ([] :: [(Child, [(Att, Type)])]) 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 # | |
(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 # | |
Defined in Language.Grammars.AspectAG | |
Empties ([] :: [(Child, Type)]) prd Source # | |
Kn ([] :: [(Child, Type)]) prod Source # | |
(Empties fcr prd, chi ~ Chi ch prd nt, LabelSet ((,) chi ([] :: [(Att, Type)]) ': EmptiesR fcr)) => Empties ((,) chi (Attribution e -> Attribution a) ': fcr) prd Source # | |
Defined in Language.Grammars.AspectAG type EmptiesR ((chi, Attribution e -> Attribution a) ': fcr) :: [(Child, [(Att, Type)])] Source # empties :: Record ((chi, Attribution e -> Attribution a) ': fcr) -> ChAttsRec prd (EmptiesR ((chi, Attribution e -> Attribution a) ': fcr)) 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 # | |
Defined in Language.Grammars.AspectAG type ICh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source # type SCh ((lch, Attribution ich -> Attribution sch) ': fc) :: [(Child, [(Att, Type)])] Source # 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 # | |
type ResAt (Chi ch prd nt :: Child) (Att att t :: Att) (Reader (Proxy ctx, Fam prd' chi par)) Source # | |
type ShowT (Chi l p s :: Child) Source # | |
type EmptiesR ([] :: [(Child, Type)]) Source # | |
type ICh ([] :: [(Child, Type)]) Source # | |
type SCh ([] :: [(Child, Type)]) Source # | |
type EmptiesR ((,) chi (Attribution e -> Attribution a) ': fcr) Source # | |
Defined in Language.Grammars.AspectAG type EmptiesR ((,) chi (Attribution e -> Attribution a) ': fcr) = (,) chi ([] :: [(Att, Type)]) ': EmptiesR fcr | |
type ICh ((,) lch (Attribution ich -> Attribution sch) ': fc) Source # | |
Defined in Language.Grammars.AspectAG | |
type SCh ((,) lch (Attribution ich -> Attribution sch) ': fc) Source # | |
Defined in Language.Grammars.AspectAG |
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 # | |
(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 # | |
(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 # | |
type ShowT (NT l :: NT) 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 # | |
(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 # | |
(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 # | |
type ShowT (T l :: T) Source # | |
index type
Instances
(Show v, Show (Record xs), LabelSet ((,) l v ': xs)) => Show (Record ((,) l v ': xs)) Source # | |
Show (Record ([] :: [(k', k'')])) Source # | Show instance, used for debugging |
type ShowField Reco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowRec Reco Source # | Type level show utilities |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField Reco (v :: Type) Source # | field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
pattern ConsR :: LabelSet ('(l, v) ': xs) => Tagged l v -> Rec Reco xs -> Rec Reco ('(l, v) ': xs) Source #
Constructors
emptyRecord :: Record '[] Source #
For the empty Record
Destructors
labelTChAtt :: Tagged l v -> Label l Source #
Same, mnemonically defined
type Attribution (attr :: [(Att, Type)]) = Rec AttReco attr Source #
- Attribution | An attribution is a record constructed from attributes
datatype implementation
index type
Instances
pattern EmptyAtt :: Attribution '[] Source #
Pattern Synonyms
pattern ConsAtt :: LabelSet ('(att, val) ': atts) => Attribute att val -> Attribution atts -> Attribution ('(att, val) ': atts) Source #
Constructors
(*.) :: LabelSet ('(att, val) ': atts) => Attribute att val -> Attribution atts -> Attribution ('(att, val) ': atts) infixr 2 Source #
Extending
emptyAtt :: Attribution '[] Source #
Empty
Destructors
(#.) :: (msg ~ '[(Text "looking up attribute " :<>: ShowT l) :$$: (Text "on " :<>: ShowT 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 ShowField (ChiReco a) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowRec (ChiReco a) Source # | Type level Show utilities |
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
pattern EmptyCh :: ChAttsRec prd '[] Source #
since now we implement ChAttsRec as a generic record, this allows us to recover pattern matching
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) Source #
type TaggedChAttr prd = TagField (ChiReco prd) Source #
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
(.*) :: LabelSet ('(ch, attrib) ': attribs) => TaggedChAttr prd ch attrib -> ChAttsRec prd attribs -> ChAttsRec 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 " :<>: ShowT c) :$$: (Text "on " :<>: ShowT r)) :$$: (Text "producion: " :<>: ShowT prd)], Require (OpLookup (ChiReco prd) c r) ctx) => Rec (ChiReco prd) r -> Label c -> ReqR (OpLookup (ChiReco prd) c r) infixl 8 Source #