On Thu, Oct 14, 2010 at 1:53 PM, Mihai Maruseac <mihai.marus...@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: http://www.haskell.org/haskellwiki/Ministg 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: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/options-debugging.html#id595218 I hope that helps, Jason
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe