9 normalizer_ = normalizer;
18 while (
auto pi =
type->isa<
Pi>()) {
19 if (
auto mut = pi->isa_mut()) {
20 if (
auto [_, ins] = done.emplace(mut); !ins) {
25 curr = curr->codom()->as<
Pi>();
26 }
while (curr != mut);
38std::tuple<const Axiom*, u8, u8>
Axiom::get(
const Def* def) {
39 if (
auto axiom = def->isa<Axiom>())
return {axiom, axiom->curry(), axiom->trip()};
40 if (
auto app = def->isa<
App>())
return {app->axiom(), app->curry(), app->trip()};
41 return {
nullptr, 0, 0};
static std::pair< u8, u8 > infer_curry_and_trip(const Def *type)
static std::tuple< const Axiom *, u8, u8 > get(const Def *def)
Yields currying counter of def.
const Def * type() const noexcept
Yields the "raw" type of this Def (maybe nullptr).
A dependent function type.
const Def *(*)(const Def *, const Def *, const Def *) NormalizeFn