Go to the source code of this file.
|
| ClosLit | mim::plug::clos::isa_clos_lit (const Def *def, bool fn_isa_lam=true) |
| | Tries to match a closure literal.
|
| const Def * | mim::plug::clos::clos_pack (const Def *env, const Def *fn, const Def *ct=nullptr) |
| | Pack a typed closure. This assumes that fn expects the environment as its Clos_Env_Paramth argument.
|
| std::tuple< const Def *, const Def *, const Def * > | mim::plug::clos::clos_unpack (const Def *c) |
| | Deconstruct a closure into (env_type, function, env).
|
| const Def * | mim::plug::clos::clos_apply (const Def *closure, const Def *args) |
| | Apply a closure to arguments.
|
| const Def * | mim::plug::clos::apply_closure (const Def *closure, Defs args) |
| template<class N> |
| std::tuple< const Extract *, N * > | mim::plug::clos::ca_isa_var (const Def *def) |
| | Checks if def is the variable of a mut of type N.
|
| const Sigma * | mim::plug::clos::isa_clos_type (const Def *def) |
| Sigma * | mim::plug::clos::clos_type (const Pi *pi) |
| | Creates a typed closure type from pi.
|
| const Pi * | mim::plug::clos::clos_type_to_pi (const Def *ct, const Def *new_env_type=nullptr) |
| | Convert a closure type to a Pi, where the environment type has been removed or replaced by new_env_type (if new_env_type != nullptr).
|
|
| static constexpr size_t | mim::plug::clos::Clos_Env_Param = 1_u64 |
| | Describes where the environment is placed in the argument list.
|
| size_t | mim::plug::clos::shift_env (size_t i) |
| size_t | mim::plug::clos::skip_env (size_t i) |
| const Def * | mim::plug::clos::ctype (World &w, Defs doms, const Def *env_type=nullptr) |
| const Def * | mim::plug::clos::clos_insert_env (size_t i, const Def *env, std::function< const Def *(size_t)> f) |
| const Def * | mim::plug::clos::clos_insert_env (size_t i, const Def *env, const Def *a) |
| const Def * | mim::plug::clos::clos_insert_env (const Def *env, const Def *tup_or_sig) |
| const Def * | mim::plug::clos::clos_remove_env (size_t i, std::function< const Def *(size_t)> f) |
| const Def * | mim::plug::clos::clos_remove_env (size_t i, const Def *def) |
| const Def * | mim::plug::clos::clos_remove_env (const Def *tup_or_sig) |
| const Def * | mim::plug::clos::clos_sub_env (const Def *tup_or_sig, const Def *new_env) |