Closed cies closed 10 years ago
The runtime should always be printed before application code. It references the Defined
and Nullable
types inside functions that are only invoked through application code. I don't see how this could go wrong... Is this reproducible without yesod-fay if you use fay --no-rts
and include the runtime separately?
I just tried, but could not reproduce it in a minimal Fay-only example. As you said I used --no-rts
and included the runtime separately, after that it still works like a charm.
I'll look deeper into what Yesod-Fay does differently.
I'll close this in favor of fpco/yesod-fay#12. Please re-open if it turns out to be a fay problem.
Somehow it feels weird that a runtime needs particular application code to run. This prevents (in some cases) the runtime from being in a separate JS file from the application code.
When wrongly separating the runtime from the application code I got the following JS error in my Chrome browser:
Find more info about this issue here:
https://github.com/fpco/yesod-fay/issues/12