stylewarning / deprecated-coalton-prototype

Coalton is (supposed to be) a dialect of ML embedded in Common Lisp.
MIT License
208 stars 7 forks source link

allow (DEFINE-TYPE A A) #19

Closed stylewarning closed 4 years ago

stylewarning commented 4 years ago

This commit refactors how values are compiled. In particular, something like (DEFINE-TYPE A C1 C2 ... Cn) is compiled as

(DEFCLASS A ())
(DEFCLASS A/C1 (A))
...
(DEFCLASS A/Cn (A))

It's not the most mathematically elegant (it "pollutes"), but it seems like a practical trade-off.

This fixes issue #9.