MimIR 0.1
MimIR is my Intermediate Representation
|
#include <mim/check.h>
Public Types | |
enum | Mode { Check , Test } |
Public Member Functions | |
Checker (World &world) | |
World & | world () |
Static Public Member Functions | |
template<Mode mode> | |
static bool | alpha (const Def *d1, const Def *d2) |
static const Def * | assignable (const Def *type, const Def *value) |
Can value be assigned to sth of type ? | |
static const Def * | is_uniform (Defs defs) |
Yields defs.front() , if all defs are Check::alpha-equivalent (Mode::Test ) and nullptr otherwise. | |
enum mim::Checker::Mode |
Enumerator | |
---|---|
Check | In Mode::Check, type inference is happening and Holes will be resolved, if possible. Also, two free but different Vars are considered α-equivalent. |
Test | In Mode::Test, no type inference is happening and Holes will not be touched. Also, Two free but different Vars are not considered α-equivalent. |
|
inline |
Definition at line 71 of file check.h.
References Checker(), and mim::Def::world().
Referenced by mim::Arr::check(), mim::Pi::check(), mim::Sigma::check(), mim::World::extract(), mim::World::insert(), is_uniform(), mim::Axiom::rebuild_(), and mim::World::test().
|
inlinestaticnodiscard |
Can value
be assigned to sth of type
?
equiv(type, value->type())
since type
may be dependent. Definition at line 77 of file check.h.
References Checker(), and mim::Def::world().
Referenced by mim::World::app(), mim::Lam::check(), mim::World::insert(), and mim::World::tuple().
Yields defs.front()
, if all defs
are Check::alpha-equivalent (Mode::Test
) and nullptr
otherwise.
Definition at line 240 of file check.cpp.
References alpha().
Referenced by mim::World::sigma(), and mim::World::tuple().
|
inline |