Closed leissa closed 1 year ago
When is a method isa_
and when is_
?
When is a method
isa_
and whenis_
?
See here:
- methods/functions that return a
bool
should be prefixed withis_
- methods/functions that return a
std::optional
or a pointer that may benullptr
should be prefixed withisa_
Usually an isa
method is more versatile because you can check and it directly gives you a handle to work with.
refly::debug_print
is now internalautodiff_aux.*
integrated intoautodiff.*
f_arg_ty
macroautodiff_aux.h
:FindAndReplaceAll
->util/container.h
:find_and_replace
isa_lit
/as_lit
->Lit::isa
/Lit::as
is_open_continuation
(no was using it anyway)util/container.h
->util/util.h
and put some other random helpers into this file while grouping themcompose_continuation
->compose_cn
and now lives inlam.h
Scope::is_free
Def::restructure
->Def::freeze
(since we changed nominals/structural to mutables/immutables)autogen.h
in orderSubstituted some helpers from autodiff with what we already had and improved on that:
is_contiuation
->Lam::is_cn
/Pi::isa_cn
is_returning_continuation
->Lam::isa_returning
/Pi::isa_returning
is_open_continuation
->Lam::isa_basicblock
/Pi::isa_basicblock
continuation_dom(lam)
->lam->dom(2, 0)
(extract elem 0 from 2-tuple).continuatuion_codom
->Lam::ret_dom
/Pi::ret_dom