eholk / harlan

A language for GPU computing.
Other
1.19k stars 82 forks source link

Allow type annotations in binding positions #128

Open eholk opened 10 years ago

eholk commented 10 years ago

We avoided these originally because we wanted Harlan to feel like a dynamically-typed language--that is, the programmer would never have to see or write a type annotation. We've strayed away from this now with ADTs and external function declarations, so it makes sense now to optionally allow type annotations. For example, instead of (define (foo a b) ...) we could write (define (foo (a : float) (b : Expr)) ...).

These type annotations would be allowed in any binding position, such as kernel, let and match expressions.

This needs to play nicely with #127.