categorifier icon indicating copy to clipboard operation
categorifier copied to clipboard

Run `categorify` in `CoreM`

Open zliu41 opened this issue 3 years ago • 0 comments

Currently categorify runs in CategoryStack, which doesn't include CoreM. This is because categorify is used as a rewrite rule, and the type of ru_try doesn't permit using CoreM.

This means we can't do CoreM things in it, like findId.

It should be possible to use categorify to modify the CoreProgram directly (see bindsOnlyPass), i.e., we just look for applications of Categorifier.Categorify.expression and rewrite them. This way it can run in CoreM, giving us more flexibility.

zliu41 avatar Apr 21 '22 01:04 zliu41