[Haskell-cafe] Thunks

Jason Dagit dagit at codersbase.com
Thu Oct 14 17:12:10 EDT 2010

On Thu, Oct 14, 2010 at 1:53 PM, Mihai Maruseac <mihai.maruseac at gmail.com>wrote:

> Hi,
> Is there a way to determine the order in which thunks are created and
> expanded/evaluated in Haskell (GHC)? I'm looking mainly at some
> existing interface but if there is only something in the GHC source it
> will suffice.

You'll want to look at STG (spineless tagless G-Machine).  See here and the
linked paper:

I don't know of any way to examine this for a running program.  You can get
GHC to spit out core and STG using -ddump-core and -ddump-stg flags:

I hope that helps,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101014/1c2ebaa1/attachment.html

More information about the Haskell-Cafe mailing list