STG to JavaScript translation

Neil Mitchell ndmitchell at
Mon Sep 17 07:01:02 EDT 2007


Are you aware that Dimitry is still working on ycr2js - and has made
great progress. There are details available in The Monad Reader, issue
7 (



On 9/17/07, Victor Nazarov <asviraspossible at> wrote:
> Hello.
> I'm working on the translation of GHC's STG language to
> JavaScript. I've started my implementation, but I've got stuck with
> the STG case statements. The problem is the binder in case expression.
> StgCase expr livevars liverhsvars bndr srt alttype alts
> Operationally, I need to save continuation and evaluate expr
> expression, but I have no idea what to do with the bndr. It seems to
> me that I need to build a closure binded by bndr with the body of
> expr evaluate it, update it, and use it in RHSs of alternatives.
> But It seems that this behavior isn't intended by GHC. Can you explain briefly
> how GHC implements this binder and what this binder points to.
> Here are some notes about Dmitries last year activity and my activity:
> --
> vir
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at

More information about the Glasgow-haskell-users mailing list