Safe Haskell | None |
---|---|
Language | Haskell2010 |
Interpreter to beta-reduce static lambdas introduced only because of the compiling machinery (hence preserving lambdas put by the user).
Type BetaT
data BetaT term a where Source #
The annotation here is if a lambda is known statically,
and so can be applied if given an argument,
Moreover, it only does this beta-reduction if the lambda
has been introduced by the compiling phase
(which happens when a symantic method is a function
between term
s instead of being only a term
)
(i.e. lam1
is used, not lam
)
BetaT_Unk :: term a -> BetaT term a | |
BetaT_Lam1 :: (BetaT term a -> BetaT term b) -> BetaT term (a -> b) |
Instances
Sym_Lambda term => Trans (BetaT term) Source # | |
Defined in Language.Symantic.Transforming.Beta trans :: UnT (BetaT term) a -> BetaT term a Source # unTrans :: BetaT term a -> UnT (BetaT term) a Source # trans1 :: (UnT (BetaT term) a -> UnT (BetaT term) b) -> BetaT term a -> BetaT term b Source # trans2 :: (UnT (BetaT term) a -> UnT (BetaT term) b -> UnT (BetaT term) c) -> BetaT term a -> BetaT term b -> BetaT term c Source # trans3 :: (UnT (BetaT term) a -> UnT (BetaT term) b -> UnT (BetaT term) c -> UnT (BetaT term) d) -> BetaT term a -> BetaT term b -> BetaT term c -> BetaT term d Source # | |
Sym_Lambda term => Sym_Lambda (BetaT term) Source # | |
Defined in Language.Symantic.Transforming.Beta apply :: BetaT term ((a -> b) -> a -> b) Source # app :: BetaT term (a -> b) -> BetaT term a -> BetaT term b Source # lam :: (BetaT term a -> BetaT term b) -> BetaT term (a -> b) Source # let_ :: BetaT term var -> (BetaT term var -> BetaT term res) -> BetaT term res Source # lam1 :: (BetaT term a -> BetaT term b) -> BetaT term (a -> b) Source # qual :: proxy q -> BetaT term t -> BetaT term (q #> t) Source # | |
type UnT (BetaT term) Source # | |
Defined in Language.Symantic.Transforming.Beta |