faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

Fixed not working examples. #398

Closed Mart-Bogdan closed 10 years ago

Mart-Bogdan commented 10 years ago

FayFromJs still not working at 100% and outputs:

aVector = {"x":1,"y":2}
|aVector| = 2.23606797749979
|[10, 20]| = 22.360679774997898
aVector + [10, 20] = {"x":{"forced":false},"y":{"forced":false}}
aVector + [10, 20] = {"x":{"forced":false},"y":{"forced":false}}

{"forced":false} is unevaluated lazy value. Possible solitions: allow struct data structures or override toJSON() function of object.

Mart-Bogdan commented 10 years ago

Oops, I haven't noticed, that I have to compile it with --strict option.