etaoins / llambda

Scheme R7RS frontend for LLVM
Other
69 stars 6 forks source link

Typed (case-lambda) #39

Closed etaoins closed 10 years ago

etaoins commented 10 years ago

Instead of using the existing R7RS (case-lambda) macro (case-lambda) should become a primitive expression that explicitly tracks the signature of each case. This provides a number of benefits:

1) The sanity of the (case-lambda)'s arities can be checked at declaration time with useful diagnostics

2) The arity of (case-lambda)applications can be validated at compile time

3) (case-lambda:) with type feedback can be implemented using the existing typed lambda infrastructure

4) Code generation and closure handling could be improved, particularly with mutable pairs

etaoins commented 10 years ago

Implemented in master