[GHC] #13831: GHCi ignores -fforce-recomp on first :reload when used with custom preprocessor

GHC ghc-devs at haskell.org
Thu Jun 15 04:29:39 UTC 2017


#13831: GHCi ignores -fforce-recomp on first :reload when used with custom
preprocessor
-------------------------------------+-------------------------------------
           Reporter:  SimonHengel    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.0.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Steps to reproduce:

 {{{#!bash
 #!/bin/bash
 # file preprocess.sh
 echo "main = putStrLn \"`date -u`\"" > "$3"
 echo "Reloaded!"
 }}}

 {{{#!hs
 -- file Main.hs
 {-# OPTIONS_GHC -fforce-recomp -F -pgmF preprocess.sh #-}
 }}}

 {{{
 $ chmod +x preprocess.sh
 $ PATH=.:$PATH ghci Main.hs -v0
 Reloaded!
 *Main> main
 Thu Jun 15 04:15:26 UTC 2017
 *Main> :reload
 *Main> main
 Thu Jun 15 04:15:26 UTC 2017
 *Main> :reload
 Reloaded!
 *Main> main
 Thu Jun 15 04:15:35 UTC 2017
 }}}

 As is evident from the output above, the first `:reload` got lost;
 {{{preprocessor.sh}}} is not executed at all.  The second `:reload` works
 as expected.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13831>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list