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

De/serialize type variables as 'automatic'; #424 #430

Closed ryachza closed 9 years ago

ryachza commented 9 years ago

Updated the de/serialization of a to use "automatic"

I needed to make more changes to the serialization.hs test than I originally expected. The issues seemed to be related to strictness rather than serialization. The previous version seemed to expect a -> to indicate less strictness than use of concrete types. While it seems overall evaluation may be too strict, I wouldn't expect it to vary based on whether the type is static.

One thing I observed that I would like to try to understand is how changes in runtime.js can cause changes in the generated callsite code. The previous serialization.js contained many instances of $36$uncurried$36$uncurried that then were no longer present after updating runtime.js.

bergmark commented 9 years ago

One thing I observed that I would like to try to understand is how changes in runtime.js can cause changes in the generated callsite code. The previous serialization.js contained many instances of $36$uncurried$36$uncurried that then were no longer present after updating runtime.js.

Are you sure about this? It sounds very strange!

ryachza commented 9 years ago

Yes. I was very surprised, but was able to consistently reproduce it multiple times when switching between master and following these changes.