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

Re: Modules and their explicit export lists (are an annoyance)

2010-06-21 Thread Christian Höner zu Siederdissen
Thanks everybody for your thoughts. Based on what I've read this is what I will do: - fork a 'foreign' library, if I need to extend it substantially - export everything explicitly - or set namespaces like this: - Library (with the more stable interface) - Library.Internal (which exports everyt

Re: Modules and their explicit export lists (are an annoyance)

2010-06-21 Thread Antoine Latter
Hi Christian, I encourage you to email the lists or the library maintainer before forking - ther might be ways to solve your problem in a different way or to get the functionality you On Jun 21, 2010 4:20 PM, "Christian Höner zu Siederdissen" < choe...@tbi.univie.ac.at> wrote: Thanks everybody f

Re: Modules and their explicit export lists (are an annoyance)

2010-06-21 Thread Antoine Latter
Aarg, the "send" button is way to toucy on my mail client. I was trying to say that you should contact the community or the package maintainer to try and work something out before forking. It is true that all of this is usually free software, but it is a lot easier to manage if there aren't a lar

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/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 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