Fixed some stuff in hack branch

Fixed some fatal issues in hack lang.
@steelbrain Yes, and the problem is you're using `func`, not `fun` and that you're passing a variable to `fun`. The change you want is https://gist.github.com/simonwelsh/2c51c89e8d2035efe6ed.