Re: getting Core Haskell from GHC API with cross-module inlinings

2010-06-21 Thread Roman Beslik
On 22.06.10 05:01, Tim Chevalier wrote: It is hard to trace a link between source code appearing as values in GHC functions and what "-ddump-simpl" outputs. And I guess that "-ddump-simpl" Indeed, I think that including enough information in an External Core file, or internal Core modu

Re: getting Core Haskell from GHC API with cross-module inlinings

2010-06-21 Thread Tim Chevalier
On 6/21/10, Roman Beslik wrote: > I'm trying to: > - get source code on different stages of processing in GHC; Probably not hard to do by giving different combinations of compiler flags -- you could do this with either the API or External Core. > - dig to the GHC function which is responsible

Re: getting Core Haskell from GHC API with cross-module inlinings

2010-06-21 Thread Roman Beslik
On 21.06.10 21:45, Tim Chevalier wrote: Also, I don't know what you're trying to do, but I recommend looking at GHC's External Core feature: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/ext-core.html and at the extcore and linkcore libraries: http://hackage.haskell.org/package/extcor

Re: getting Core Haskell from GHC API with cross-module inlinings

2010-06-21 Thread Tim Chevalier
On 6/17/10, Roman Beslik wrote: > Hi. > The following code compiles "A.hs" with GHC API: > {{{ > import GHC > import Outputable > import DynFlags ( defaultDynFlags ) > libdir = "/usr/lib/ghc-6.12.1" > targetFile = "A.hs" > main = defaultErrorHandler defaultDynFlags $ do > runGhc (Just