hylang/hy — pull request #656 by Foxboron (2014-09-09 22:05:54+00:00)
Title: Type annotations for fn/lambda

Beta stage.
=======
Reff #640

`optional` and `kwargs` does not work as syntax isn't really decided upon, and we can't annotate return values as it needs macro changes.
Current approach checks for a `HyList` as given var and destructs this. Passing the annotations through `self.compile` pulling out `_expr` from the `Result()` object. This way the types are rather dynamic.

```hy
=> (defn a [[y int]] (print "lol"))
=> a.--annotations--
{'y': }

=> (defn a [[y "HEYHO LETS GO!"]] (print "lol"))
=> a.--annotations--
{'y': 'HEYHO LETS GO!'}

=> (defn a [[y (lambda [[x "Just wanna get hy"]] (print "Heyho!"))]] (print "lol"))
=> a.--annotations--
{'y': at 0x7f4939167598>}
```

CC: @hylang/core
Comments, code review, rate and hate!

:shipit: