MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
normalizers.cpp
Go to the documentation of this file.
1#include <mim/world.h>
2
4
6
7const Def* normalize_unwrap_unsafe(const Def*, const Def*, const Def* arg) {
8 if (auto name = arg->isa<Name>()) arg = name->op();
9 if (auto inj = arg->isa<Inj>(); inj && inj->index() == Opt_ctor::Some) return inj->value();
10
11 return nullptr;
12}
13
15
16} // namespace mim::plug::option
Base class for all Defs.
Definition def.h:289
const Def * op(size_t i) const noexcept
Definition def.h:377
Constructs a Join or Variant value.
Definition union.h:60
size_t index() const
The case of a Variant this injects into.
Definition union.h:75
Nominal newtype term introduction.
Definition nom.h:34
The option Plugin
const Def * normalize_unwrap_unsafe(const Def *, const Def *, const Def *arg)
#define MIM_option_NORMALIZER_IMPL
Definition autogen.h:53