shfty-elysian / elysian-legacy

Field function compiler
0 stars 0 forks source link

Stronger typing for AsIR composition #98

Closed Shfty closed 1 year ago

Shfty commented 1 year ago
Shfty commented 1 year ago

Now Shape has replaced DynAsIR, Modify has been refactored to take PreModifier and PostModifier types alongside a DynShape, thus strengthening it against accidental misuse.

The few cases where an arbitrary field was being used as a modifier have been refactored to use a new Prepass wrapper.

Need to do similar for Combine, but that's blocked on #115 due to AsIR not being blanket-implementable from elysian-shapes.

Shfty commented 1 year ago

(Closed unintentionally.)

Also worth considering a new abstraction over single-field wrappers, as many existing Shape implementors follow the pattern of composing a DynShape and its hash / domains / functions / structs, then calling its entrypoint from a new CONTEXT -> CONTEXT function.

Shfty commented 1 year ago

Done: Combine now uses the Combinator trait to assert type-level correctness. Will open a separate issue for single-field wrappers.