Re:GHCJS - Haskell in the Browser
by carterschonwald on Wednesday June 26, 2013 @01:56PM
(#5947700)
Well then I dream of a day when an ecmascript revision makes the breaking changes needed to fix this. Or some sort of clever hack works around that constraint
[ Parent
| on HN ]
The change is proposed for ECMAScript 6: http://wiki.ecmascript.org/doku.php?id=harmony:proper_tail_c...
GHCJS currently uses a trampoline, but all calls are in tail position, so when this gets implemented we can easily generate code that uses native JS tail calls.
Like GHC, GHCJS uses its own stack for non-tail calls.
Re:GHCJS - Haskell in the Browser
by carterschonwald on Wednesday June 26, 2013 @08:02PM
(#5949900)
I think native code GHC has its stack in the standard location, though it manages it explicitly (as most native code languages do). (I'll double check the ghc source later to make sure i'm quibbling correctly)