It is just as the message says: you can't use pprTrace too early in the
execution of a GHC program.  It looks like you're trying to print
something pretty simple, so why not try a plain old Debug.Trace trace?

Edward

Excerpts from Omar Mefire's message of 2015-08-15 13:40:35 -0700:
> Hi all,I'm trying to step through some ghc code.I am trying to use pprTrace ( 
> for the first time ) and I keep getting an error when I use it :I've added it 
> to the file ghc/Main.hs and the resulting code is this :
>        let argv1' = map (mkGeneralLocated "on the commandline") argv1       
> (argv2, staticFlagWarnings) <- pprTrace "argv1 prime" (ppr argv1') $ 
> parseStaticFlags argv1'
> I want to examine the value of argv1'. After my modification, I go into the 
> ghc/ folder and run : 'make'But doing this leads to an error when I try to 
> run the program :
>       ghc-stage2: panic! (the 'impossible' happened)      (GHC version 
> 7.11.20150810 for x86_64-unknown-linux): Static flags have not been 
> initialised!          Please call GHC.parseStaticFlags early enough.
> What am I doing wrong ? Omar Mefire, 
_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to