I'm interested in this, and it seems like it would be a fun way to dip my toes into the compiler (until now I've focused on the standard library). Before I start working, tho, I'd like to know what syntax we'd prefer.
Prior art are Haskell:
data Foo = Bar | Baz deriving (Eq)
and Rust:
#[derive(PartialEq)]
enum Foo {
Bar,
Baz,
}
Neither of these has obvious Coalton analogues. My first intuition is to have a separate top-level form derive-instance which looks like:
(define-type Foo Bar Baz)
(derive-instance (Eq Baz))
I'm interested in this, and it seems like it would be a fun way to dip my toes into the compiler (until now I've focused on the standard library). Before I start working, tho, I'd like to know what syntax we'd prefer.
Prior art are Haskell:
and Rust:
Neither of these has obvious Coalton analogues. My first intuition is to have a separate top-level form
derive-instance
which looks like: