added type grammar to readme, add example, del spho loc

This commit is contained in:
Ellen Arvidsson 2025-05-05 13:05:03 +02:00
parent a22c9726cd
commit 7e3c7c88ea
3 changed files with 47 additions and 35 deletions

21
example/ex5.msph Normal file
View file

@ -0,0 +1,21 @@
nominal N
nominal M
type T[X, Y] = {
// body
}
type A = T[N, M] // binding X -> N, Y -> M
type B = T[M, N] // binding X -> M, Y -> N
// converted to
type A = ⟨ X -> N, Y -> M ⟩ {
// body
}
type B = ⟨ X -> M, Y -> N ⟩ {
// body
}