Executables using GHC API require dynamic linking in GHC 7.7

2013-09-27 Thread Christiaan Baaij
Dear all, It seems that executables that use the GHC API require to be dynamically linked on GHC 7.7. At least in the case that an GHC API function has to perform linking. Statically linked executable SEGFAULT when a GHC API function tries to do linking. I build 'haddock' from source by doing

Re: Executables using GHC API require dynamic linking in GHC 7.7

2013-09-27 Thread Carter Schonwald
Hey Christian, did you build ghc and libs I both Dylib and static ways? TH uses ghci, and ghci on OS X and a few other platforms uses the system dylinker, so it may be that you've only built certain libs the static way, but ghci requires the dynamic way as of 7.7 Please let me know if that helps.

Re: Simplifying Core using GHC API

2012-07-30 Thread Simon Marlow
You can use compileToCoreSimplified to get the optimised Core for the module, although that includes the other steps. We ought to have a separate API to go from ModGuts to CoreModule, but currently that doesn't exist (it's built into compileToCoreSimplified). Cheers, Simon On

Simplifying Core using GHC API

2012-07-27 Thread Ranjit Jhala
Hi all, can anyone point me to the GHC API functions that I can use to trigger the various inlining simplifications? (i.e. to get the inlined CoreExprs that one gets with the -ddump-simpl flag?) Many thanks in advance!, Ranjit Jhala. ___

Re: Simplifying Core using GHC API

2012-07-27 Thread Ranjit Jhala
ps: I should add I already know how to get from source to CoreExpr e.g. by: mod_guts - coreModule `fmap` (desugarModuleWithLoc = typecheckModule = parseModule modSummary) Its the simplification, in particular, inlining steps that I'm after. Thanks! Ranjit. On Fri, Jul 27, 2012 at 10:04

Using GHC API to generate STG

2008-04-15 Thread Mark Wassell
Hello, I am looking at how GHC generates STG and I am finding with a very simple piece of Haskell my usage of the API is not generating as much STG as I see when using -dump-stg option. In particular it isn't generating a binding for the nullary constructor LNull (I hope that's the correct

RE: Using GHC API to generate STG

2008-04-15 Thread Simon Peyton-Jones
constructors. So the TyCons are what you want! Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Mark Wassell | Sent: 15 April 2008 11:27 | To: glasgow-haskell-users | Subject: Using GHC API to generate STG | | Hello, | | I am looking at how GHC

Re: Using GHC API

2006-11-27 Thread C.M.Brown
Hi Ian, After some playing around and hacking of my code, I finally got it to work. The problem is that the hscTarget flag needs to be set to HscNothing when running in the JustTypeCheck mode: GHC.setSessionDynFlags ses $ dflags1 {verbosity = 1, hscTarget=HscNothing} If you change the above

Re: Using GHC API

2006-11-25 Thread Ian Lynagh
Hi Chris, On Fri, Nov 10, 2006 at 04:15:10PM +, C.M.Brown wrote: I am currently in the process of porting some of the Haskell Refactorer (HaRe) over to ghc 6.6. Part of HaRe requires the API and until now I've been content with using th 6.5 API. However, since I've started the switch

Using GHC API

2006-11-10 Thread C.M.Brown
Hi, I am currently in the process of porting some of the Haskell Refactorer (HaRe) over to ghc 6.6. Part of HaRe requires the API and until now I've been content with using th 6.5 API. However, since I've started the switch I've noticed some strange problems and the latest is I am getting the