Closed timsueberkrueb closed 1 year ago
Simplified example:
data Bar(a: Type) { }
codata Baz { unit: Top }
data Foo(a: Type) {
MkFoo(a: Type): Foo(Bar(a)),
}
data Top { Unit }
def Top.ignore(a: Type, x: a): Top {
Unit => Unit
}
def Top.foo(a: Type, foo: Foo(a)): Baz {
Unit => foo.match {
MkFoo(a') => comatch {
unit => Unit.ignore(Foo(Bar(a')), foo)
}
}
}
cargo run -- lift Baz examples/foo.xfn