The Compile type needs to be changed to take an effect that returns a term.
The concrete implementation would likely be something similar to (M (m NixAST), a).
Sequencing two effects would essentially seq the contained terms.
TermCont and PEffect should be renamed and should be different instantiations of another type, e.g. PE purity a. Then plet etc. can abstract over that, same for pmatch/pcase.
The
Compile
type needs to be changed to take an effect that returns a term. The concrete implementation would likely be something similar to(M (m NixAST), a)
. Sequencing two effects would essentiallyseq
the contained terms.TermCont
andPEffect
should be renamed and should be different instantiations of another type, e.g.PE purity a
. Thenplet
etc. can abstract over that, same forpmatch
/pcase
.