Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class HContext h where
- recursiveContexts :: (Recursively HContext h, Recursively HFunctor h, Recursively HContext p, Recursively HFunctor p) => (p # h) -> HCompose (Ann (HFunc Pure (Const (p # h)))) p # h
- annContexts :: (Recursively HContext h, Recursively HFunctor h) => (Ann p # h) -> Ann (HFunc (Ann p) (Const (Ann p # h)) :*: p) # h
Documentation
class HContext h where Source #
hcontext :: (h # p) -> h # (HFunc p (Const (h # p)) :*: p) Source #
Add next to each node a function to replace it in the parent with a different value
Instances
HContext Prune Source # | |
HContext Pure Source # | |
(HContext a, HFunctor a) => HContext (Ann a) Source # | |
HContext (App expr) Source # | |
HContext (FuncType typ) Source # | |
(HFunctor c1, HContext c1, HFunctor h1, HContext h1) => HContext (HCompose c1 h1) Source # | |
(Recursively HContext h, Recursively HFunctor h) => HContext (HFlip Ann h) Source # | |
HContext (Lam v expr) Source # | |
HContext (Let v expr) Source # | |
HContext (FromNom nomId term) Source # | |
(HFunctor varTypes, HContext varTypes, HNodesConstraint varTypes OrdQVar) => HContext (NominalInst nomId varTypes) Source # | |
Defined in Hyper.Syntax.Nominal hcontext :: forall (p :: HyperType). (NominalInst nomId varTypes # p) -> NominalInst nomId varTypes # (HFunc p (Const (NominalInst nomId varTypes # p)) :*: p) Source # | |
HContext (ToNom nomId term) Source # | |
HContext (Var v expr) Source # | |
HContext (RowExtend key val rest) Source # | |
HContext (TypedLam var typ expr) Source # | |
recursiveContexts :: (Recursively HContext h, Recursively HFunctor h, Recursively HContext p, Recursively HFunctor p) => (p # h) -> HCompose (Ann (HFunc Pure (Const (p # h)))) p # h Source #
Add in the node annotations a function to replace each node in the top-level node
annContexts :: (Recursively HContext h, Recursively HFunctor h) => (Ann p # h) -> Ann (HFunc (Ann p) (Const (Ann p # h)) :*: p) # h Source #
Add in the node annotations a function to replace each node in the top-level node
It is possible to define annContexts in terms of recursiveContexts
but the conversion is quite unwieldy.