STG to JavaScript translation

Neil Mitchell ndmitchell at
Mon Sep 17 12:23:40 EDT 2007


> case e of b { pati -> rhsi }
> * evaluates 'e',
> * binds the resulting value to 'b',
> * performs case analysis on the result to find which alternative to choose
> * binds the variables of the pattern to the components of the value

The Yhc.Core translator converts this to:

let b = e in case b of { pati -> rhsi }

I'm not sure if that would be a clearer form for you to work with, as
it is closer to standard Haskell.



More information about the Glasgow-haskell-users mailing list