feat: Implement chapter 8

This commit is contained in:
Glen Whitney 2021-01-20 19:35:07 -08:00
parent 98bb2088e4
commit fddc94a906
3 changed files with 50 additions and 1 deletions

12
trans/chap8.str Normal file
View file

@ -0,0 +1,12 @@
module chap8
imports signatures/-
rules
SwapWithPat = ?Or(e1,e2); !Or(e2,e1)
SwapAnon = (Or(e1,e2) -> Or(e2,e1))
NoSwapTwice = (Or(e1,e2) -> Or(e2,e1)); (Or(e1,e2) -> Or(e2,e1))
OkSwapTwice =
{e3,e4 : (Or(e3,e4) -> Or(e4,e3))}; {e3,e4 : (Or(e3,e4) -> Or(e4,e3))}
TermWrap = !Or(<id>, Not(<id>))
TermProj = ?Or(_, Not(<id>))

View file

@ -15,6 +15,7 @@ imports
prop-desugar
chap6
chap7
chap8
rules // Debugging