effekt-lang / effekt

A research language with effect handlers and lightweight effect polymorphism

Home Page:https://effekt-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assert pre/post/invariants of phases

b-studios opened this issue · comments

It would be great if each Phase would have an additional method(s) that could check the pre- and postconditions and thus maintain invariants of the ASTs.

There should be a debug flag or similar in the config that enables this. Since this might slow down the compilation and CI significantly we might only want to run this when merging into master and not on each push.

Ideally, we would have some reusable components to check invariants such as NoLocalDefinition, NoAdditionalFreeVars, TypeChecks, ...