Copyright | (c) Juan García Garland Marcos Viera 2019 |
---|---|
License | GPL |
Maintainer | jpgarcia@fing.edu.uy |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- type family a == b where ...
- (.*.) :: LabelSet ('(l, v) ': r) => TagField c l v -> Rec c r -> Rec c ('(l, v) ': r)
- tailRec :: Rec c ('(l, v) ': r) -> Rec c r
- data Rec (c :: k) (r :: [(k', k'')]) :: Type where
- data TagField (cat :: k) (l :: k') (v :: k'') where
- untagField :: TagField c l v -> WrapField c v
- type family WrapField (c :: k') (v :: k)
- data OpLookup (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where
- data OpLookup' (b :: Bool) (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where
- type family ShowRec c :: Symbol
- type family ShowField c :: Symbol
- data OpUpdate (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where
- data OpUpdate' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where
- type family UnWrap t :: [(k, k')]
- data OpExtend (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where
- data OpExtend' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where
- data OpNonEmpty (c :: Type) (r :: [(k, k')]) where
- OpNonEmpty :: Rec c r -> OpNonEmpty c r
Documentation
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 #
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 # | |
Show (Record ([] :: [(k', k'')])) Source # | Show instance, used for debugging |
(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 UnWrap (Rec c r) Source # | |
Defined in Language.Grammars.AspectAG.GenRecord | |
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 |
untagField :: TagField c l v -> WrapField c v Source #
type family WrapField (c :: k') (v :: k) Source #
Instances
type WrapField PrdReco (rule :: Type) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField AttReco (v :: Type) Source # | field type |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField Reco (v :: Type) Source # | field type |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type WrapField (ChiReco prd :: Type) (v :: [(Att, Type)]) Source # | Field type |
Defined in Language.Grammars.AspectAG.RecordInstances |
data OpLookup (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where Source #
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 # | |
Require (OpLookup' (l == l') c l ((,) l' v ': r)) ctx => Require (OpLookup c l ((,) l' v ': r)) ctx Source # | |
type ReqR (OpLookup c l ((,) l' v ': r)) Source # | |
type ReqR (OpLookup c l ([] :: [(k, k')])) Source # | |
Defined in Language.Grammars.AspectAG.GenRecord |
data OpLookup' (b :: Bool) (c :: Type) (l :: k) (r :: [(k, k')]) :: Type where Source #
type family ShowRec c :: Symbol Source #
Instances
type ShowRec PrdReco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowRec AttReco Source # | type level utilities |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowRec Reco Source # | Type level show utilities |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowRec (ChiReco a) Source # | Type level Show utilities |
Defined in Language.Grammars.AspectAG.RecordInstances |
type family ShowField c :: Symbol Source #
Instances
type ShowField PrdReco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField AttReco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField Reco Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances | |
type ShowField (ChiReco a) Source # | |
Defined in Language.Grammars.AspectAG.RecordInstances |
data OpUpdate (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #
update
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 # | |
Require (OpUpdate' (l == l') c l v ((,) l' v' ': r)) ctx => Require (OpUpdate c l v ((,) l' v' ': r)) ctx Source # | |
type ReqR (OpUpdate c l v ([] :: [(k, k')])) Source # | |
type ReqR (OpUpdate c l v ((,) l' v' ': r)) Source # | |
data OpUpdate' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #
Instances
(LabelSet ((,) l v ': r), LabelSet ((,) l v' ': r)) => Require (OpUpdate' True c l v ((,) l v' ': r)) ctx 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 # | |
type ReqR (OpUpdate' True c l v ((,) l v' ': r)) Source # | |
type ReqR (OpUpdate' False c l v ((,) l' v' ': r)) Source # | |
data OpExtend (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #
data OpExtend' (b :: Bool) (c :: Type) (l :: k) (v :: k') (r :: [(k, k')]) :: Type where Source #
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 # | |
LabelSetF ((,) l v ': r) ~ True => Require (OpExtend' True c l v r) ctx Source # | |
type ReqR (OpExtend' False c l v r) Source # | |
Defined in Language.Grammars.AspectAG.GenRecord | |
type ReqR (OpExtend' True c l v r) Source # | |
data OpNonEmpty (c :: Type) (r :: [(k, k')]) where Source #
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 # | |
Defined in Language.Grammars.AspectAG.GenRecord type ReqR (OpNonEmpty c []) :: Type Source # req :: Proxy ctx -> OpNonEmpty c [] -> ReqR (OpNonEmpty c []) Source # | |
Require (OpNonEmpty c ((,) l v ': r)) ctx Source # | |
Defined in Language.Grammars.AspectAG.GenRecord type ReqR (OpNonEmpty c ((l, v) ': r)) :: Type Source # req :: Proxy ctx -> OpNonEmpty c ((l, v) ': r) -> ReqR (OpNonEmpty c ((l, v) ': r)) Source # |