3 ms·
I noticed the use of $, _, and globals like enumFromTo in the compiled js. It says $ means "thunk" and _ means "force". Does this means this compiled js furth
by fuzzythinker 14y ago
I noticed the use of $, _, and globals like enumFromTo in the compiled js. It says $ means "thunk" and _ means "force". Does this means this compiled js further compiled so $, _, and globals are further replaced with something like Fay$$...?
- samstokes 14y agoI think he's just defined functions called $ and _ which implement the thunking and forcing. No need for another compilation round.
- chrisdone 14y agoThose two symbols are merely to make the code easier to read as there are a lot of thunks and forcing. Previously it was Fay$$force and Fay$$thunk. Technically these are global within the Fay output, but that is all wrapped up in a closure, so it won't interfere with anything outside. Additionally, _ is not a valid function name in Haskell, and $ (and any other non-letter symbols) are encoded as $123$ where 123 is the unicode point. So these two symbols are free to use, if that bothered you at all. enumFromTo is defined in the Prelude.