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 HaskellSafe
LanguageHaskell2010

Language.Grammars.AspectAG.GenRecord

Contents

Description

 
Synopsis

Documentation

type family a == b where ... Source #

Equations

a == b = Equal a b 

Pretty constructors

(.*.) :: LabelSet ('(l, v) ': r) => TagField c l v -> Rec c r -> Rec c ('(l, v) ': r) infixr 2 Source #

destructors

tailRec :: Rec c ('(l, v) ': r) -> Rec c r Source #

A getter, also a predicate class HasField (l :: k) (r :: [(k, k')]) field where type LookupByLabel field l r :: Type (#) :: REC field r -> Label l -> LookupByLabel field l v

data Rec (c :: k) (r :: [(k', k'')]) :: Type where Source #

Constructors

EmptyRec :: Rec c '[] 
ConsRec :: LabelSet ('(l, v) ': r) => TagField c l v -> Rec c r -> Rec c ('(l, v) ': r) 
Instances
(Show v, Show (Record xs), LabelSet ((,) l v ': xs)) => Show (Record ((,) l v ': xs)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

Methods

showsPrec :: Int -> Record ((l, v) ': xs) -> ShowS #

show :: Record ((l, v) ': xs) -> String #

showList :: [Record ((l, v) ': xs)] -> ShowS #

Show (Record ([] :: [(k', k'')])) Source #

Show instance, used for debugging

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

Methods

showsPrec :: Int -> Record [] -> ShowS #

show :: Record [] -> String #

showList :: [Record []] -> ShowS #

(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 #

(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 #

type UnWrap (Rec c r) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type UnWrap (Rec c r) = r
type EmptiesR ((,) chi (Attribution e -> Attribution a) ': fcr) Source # 
Instance details

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 # 
Instance details

Defined in Language.Grammars.AspectAG

type ICh ((,) lch (Attribution ich -> Attribution sch) ': fc) = (,) lch ich ': ICh fc
type SCh ((,) lch (Attribution ich -> Attribution sch) ': fc) Source # 
Instance details

Defined in Language.Grammars.AspectAG

type SCh ((,) lch (Attribution ich -> Attribution sch) ': fc) = (,) lch sch ': SCh fc

data TagField (cat :: k) (l :: k') (v :: k'') where Source #

Constructors

TagField :: Label c -> Label l -> WrapField c v -> TagField c l v 

type family WrapField (c :: k') (v :: k) Source #

Instances
type WrapField PrdReco (rule :: Type) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField PrdReco (rule :: Type) = rule
type WrapField AttReco (v :: Type) Source #

field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField AttReco (v :: Type) = v
type WrapField Reco (v :: Type) Source #

field type

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type WrapField Reco (v :: Type) = v
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 OpLookup (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where Source #

Constructors

OpLookup :: Label l -> Rec c r -> OpLookup c l r 
Instances
Require (OpError ((Text "field not Found on " :<>: Text (ShowRec c)) :$$: ((Text "looking up the " :<>: Text (ShowField c)) :<>: ShowT l))) ctx => Require (OpLookup c l ([] :: [(k, k')])) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpLookup c l []) :: Type Source #

Methods

req :: Proxy ctx -> OpLookup c l [] -> ReqR (OpLookup c l []) Source #

Require (OpLookup' (l == l') c l ((,) l' v ': r)) ctx => Require (OpLookup c l ((,) l' v ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpLookup c l ((l', v) ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpLookup c l ((l', v) ': r) -> ReqR (OpLookup c l ((l', v) ': r)) Source #

type ReqR (OpLookup c l ((,) l' v ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpLookup c l ((,) l' v ': r)) = ReqR (OpLookup' (l == l') c l ((,) l' v ': r))
type ReqR (OpLookup c l ([] :: [(k, k')])) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpLookup c l ([] :: [(k, k')])) = ()

data OpLookup' (b :: Bool) (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where Source #

Constructors

OpLookup' :: Proxy b -> Label l -> Rec c r -> OpLookup' b c l r 
Instances
Require (OpLookup c l r) ctx => Require (OpLookup' False c l ((,) l' v ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpLookup' False c l ((l', v) ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpLookup' False c l ((l', v) ': r) -> ReqR (OpLookup' False c l ((l', v) ': r)) Source #

Require (OpLookup' True c l ((,) l v ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpLookup' True c l ((l, v) ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpLookup' True c l ((l, v) ': r) -> ReqR (OpLookup' True c l ((l, v) ': r)) Source #

type ReqR (OpLookup' False c l ((,) l' v ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpLookup' False c l ((,) l' v ': r)) = ReqR (OpLookup c l r)
type ReqR (OpLookup' True c l ((,) l v ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpLookup' True c l ((,) l v ': r)) = WrapField c v

type family ShowRec c :: Symbol Source #

Instances
type ShowRec PrdReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec PrdReco = "Aspect"
type ShowRec AttReco Source #

type level utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec AttReco = "Attribution"
type ShowRec Reco Source #

Type level show utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec Reco = "Record"
type ShowRec (ChiReco a) Source #

Type level Show utilities

Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowRec (ChiReco a) = "Children Map"

type family ShowField c :: Symbol Source #

Instances
type ShowField PrdReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField PrdReco = "production named "
type ShowField AttReco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField AttReco = "attribute named "
type ShowField Reco Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField Reco = "field named "
type ShowField (ChiReco a) Source # 
Instance details

Defined in Language.Grammars.AspectAG.RecordInstances

type ShowField (ChiReco a) = "child labelled "

data OpUpdate (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #

update

Constructors

OpUpdate :: Label l -> WrapField c v -> Rec c r -> OpUpdate c l v r 
Instances
Require (OpError ((Text "field not Found on " :<>: Text (ShowRec c)) :$$: ((Text "updating the " :<>: Text (ShowField c)) :<>: ShowT l))) ctx => Require (OpUpdate c l v ([] :: [(k, k')])) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpUpdate c l v []) :: Type Source #

Methods

req :: Proxy ctx -> OpUpdate c l v [] -> ReqR (OpUpdate c l v []) Source #

Require (OpUpdate' (l == l') c l v ((,) l' v' ': r)) ctx => Require (OpUpdate c l v ((,) l' v' ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpUpdate c l v ((l', v') ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpUpdate c l v ((l', v') ': r) -> ReqR (OpUpdate c l v ((l', v') ': r)) Source #

type ReqR (OpUpdate c l v ([] :: [(k, k')])) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpUpdate c l v ([] :: [(k, k')])) = Rec c ([] :: [((Any :: Type), (Any :: Type))])
type ReqR (OpUpdate c l v ((,) l' v' ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpUpdate c l v ((,) l' v' ': r)) = ReqR (OpUpdate' (l == l') c l v ((,) l' v' ': r))

data OpUpdate' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #

Constructors

OpUpdate' :: Proxy p -> Label l -> WrapField c v -> Rec c r -> OpUpdate' b c l v r 
Instances
(LabelSet ((,) l v ': r), LabelSet ((,) l v' ': r)) => Require (OpUpdate' True c l v ((,) l v' ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpUpdate' True c l v ((l, v') ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpUpdate' True c l v ((l, v') ': r) -> ReqR (OpUpdate' True c l v ((l, v') ': r)) Source #

(Require (OpUpdate c l v r) ctx, (UnWrap (ReqR (OpUpdate c l v r)) :: [(k2, k1)]) ~ r0, LabelSet ((,) l' v' ': r0), ReqR (OpUpdate c l v r) ~ Rec c r0) => Require (OpUpdate' False c l v ((,) l' v' ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpUpdate' False c l v ((l', v') ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpUpdate' False c l v ((l', v') ': r) -> ReqR (OpUpdate' False c l v ((l', v') ': r)) Source #

type ReqR (OpUpdate' True c l v ((,) l v' ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpUpdate' True c l v ((,) l v' ': r)) = Rec c ((,) l v ': r)
type ReqR (OpUpdate' False c l v ((,) l' v' ': r)) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpUpdate' False c l v ((,) l' v' ': r)) = Rec c ((,) l' v' ': (UnWrap (ReqR (OpUpdate c l v r)) :: [(k2, k1)]))

type family UnWrap t :: [(k, k')] Source #

Instances
type UnWrap (Rec c r) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type UnWrap (Rec c r) = r

data OpExtend (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #

Constructors

OpExtend :: Label l -> WrapField c v -> Rec c r -> OpExtend c l v r 
Instances
(LabelSetF ((,) l v ': r) ~ b, Require (OpExtend' b c l v r) ctx) => Require (OpExtend c l v r) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpExtend c l v r) :: Type Source #

Methods

req :: Proxy ctx -> OpExtend c l v r -> ReqR (OpExtend c l v r) Source #

type ReqR (OpExtend c l v r) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpExtend c l v r) = ReqR (OpExtend' (LabelSetF ((,) l v ': r)) c l v r)

data OpExtend' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #

Constructors

OpExtend' :: Proxy b -> Label l -> WrapField c v -> Rec c r -> OpExtend' b c l v r 
Instances
Require (OpError ((Text "Duplicated Labels on " :<>: Text (ShowRec c)) :$$: ((Text "on the " :<>: Text (ShowField c)) :<>: ShowT l))) ctx => Require (OpExtend' False c l v r) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpExtend' False c l v r) :: Type Source #

Methods

req :: Proxy ctx -> OpExtend' False c l v r -> ReqR (OpExtend' False c l v r) Source #

LabelSetF ((,) l v ': r) ~ True => Require (OpExtend' True c l v r) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpExtend' True c l v r) :: Type Source #

Methods

req :: Proxy ctx -> OpExtend' True c l v r -> ReqR (OpExtend' True c l v r) Source #

type ReqR (OpExtend' False c l v r) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpExtend' False c l v r) = Rec c r
type ReqR (OpExtend' True c l v r) Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

type ReqR (OpExtend' True c l v r) = Rec c ((,) l v ': r)

data OpNonEmpty (c :: Type) (r :: [(k, k')]) where Source #

Constructors

OpNonEmpty :: Rec c r -> OpNonEmpty c r 
Instances
Require (OpError ((Text "Empty " :<>: Text (ShowRec c)) :$$: Text " Required to be nonempty ")) ctx => Require (OpNonEmpty c ([] :: [(k, k')])) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpNonEmpty c []) :: Type Source #

Methods

req :: Proxy ctx -> OpNonEmpty c [] -> ReqR (OpNonEmpty c []) Source #

Require (OpNonEmpty c ((,) l v ': r)) ctx Source # 
Instance details

Defined in Language.Grammars.AspectAG.GenRecord

Associated Types

type ReqR (OpNonEmpty c ((l, v) ': r)) :: Type Source #

Methods

req :: Proxy ctx -> OpNonEmpty c ((l, v) ': r) -> ReqR (OpNonEmpty c ((l, v) ': r)) Source #