I've got another idea about the typing of constraints that correspond to MinionConstraints. But it might require merging the minion ast into the conjure_core crate (hence probably removing the minion_rs crate). We can talk tomorrow.
In short, we can parameterise the Constraint type in minion_rs by what Literal and Atom types it works on. Then, remove duplication in the Essence AST, instead have a variant that carries a MinionConstraint directly. We can use the type arguments to say it can be any Expr of just Literals or just Atoms as needed.
Or maybe we can get away without merging the two crates if MinionConstraints never need to carry Exprs in them. Not sure yet.
I've got another idea about the typing of constraints that correspond to MinionConstraints. But it might require merging the minion ast into the conjure_core crate (hence probably removing the minion_rs crate). We can talk tomorrow.
In short, we can parameterise the Constraint type in minion_rs by what Literal and Atom types it works on. Then, remove duplication in the Essence AST, instead have a variant that carries a MinionConstraint directly. We can use the type arguments to say it can be any Expr of just Literals or just Atoms as needed.
Or maybe we can get away without merging the two crates if MinionConstraints never need to carry Exprs in them. Not sure yet.