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

Don't cache the main thunk and add test case #406

Closed chrisdone closed 10 years ago

chrisdone commented 10 years ago

I think I never set the true (meaning no-cache) in main just because I never realised this case would happen, and clearly nobody noticed. A workaround is to add a dummy arg to doThing like (), but this is the proper fix.

chrisdone commented 10 years ago

Oh, I forgot to state the problem. This will cache the thunk and you will get

Uncaught TypeError: Property 'value' of object #<Fay$$$> is not a function 

Upon the second run of doThing.

chrisdone commented 10 years ago

Another fix is to put return () at the end of the do block of your main.

bergmark commented 10 years ago

Man travis disk IO is so slow :-(

chrisdone commented 10 years ago

Test run exceeded 50 minutes. :-(

bergmark commented 10 years ago

Hackag'd!

chrisdone commented 10 years ago

Thanks babe!

bergmark commented 10 years ago

blush