<div dir="ltr">Yes, this is consistent with my investigation. The only place I could find in the source which emitted the message <span style="color:rgb(117,117,117)">"Too late for parseStaticFlags..." was ghc/Main.hs. What puzzled me was why this is a Mac specific bug.</span></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 19, 2016 at 10:21 AM GHC <<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">#10053: Regression on MacOS platform, error  in ghci calling main after loading<br>
compiled code: "Too late for parseStaticFlags..."<br>
-------------------------------------+-------------------------------------<br>
        Reporter:  George            |                Owner:  ak3n<br>
            Type:  bug               |               Status:  new<br>
        Priority:  normal            |            Milestone:<br>
       Component:  GHCi              |              Version:  7.10.1-rc2<br>
      Resolution:                    |             Keywords:<br>
Operating System:  MacOS X           |         Architecture:  x86_64<br>
 Type of failure:  Incorrect result  |  (amd64)<br>
  at runtime                         |            Test Case:<br>
      Blocked By:                    |             Blocking:<br>
 Related Tickets:                    |  Differential Rev(s):<br>
       Wiki Page:                    |<br>
-------------------------------------+-------------------------------------<br>
<br>
Comment (by ak3n):<br>
<br>
 Replying to [comment:17 bgamari]:<br>
 > ak3n, could you elaborate?<br>
<br>
 This error is raised in<br>
 [<a href="https://github.com/ghc/ghc/blob/master/compiler/main/StaticFlags.hs#L80" rel="noreferrer" target="_blank">https://github.com/ghc/ghc/blob/master/compiler/main/StaticFlags.hs#L80</a><br>
 compiler/main/Staticflags.hs], when parseStaticFlags is called in<br>
 [<a href="https://github.com/ghc/ghc/blob/master/ghc/Main.hs#L113" rel="noreferrer" target="_blank">https://github.com/ghc/ghc/blob/master/ghc/Main.hs#L113</a> ghc/Main.hs].<br>
<br>
 So, this code is called two times: on ghci start and on "main" input<br>
 statement.<br>
<br>
 It looks like, linker replaces "main" from the loaded module<br>
 with "main" of ghc.<br>
<br>
--<br>
Ticket URL: <<a href="http://ghc.haskell.org/trac/ghc/ticket/10053#comment:18" rel="noreferrer" target="_blank">http://ghc.haskell.org/trac/ghc/ticket/10053#comment:18</a>><br>
GHC <<a href="http://www.haskell.org/ghc/" rel="noreferrer" target="_blank">http://www.haskell.org/ghc/</a>><br>
The Glasgow Haskell Compiler<br>
</blockquote></div>