Skip to content

The behavior of -ignore-dot-ghci and -ghci-script are weird

$ for i in `seq 10`; do echo "print $i" > /tmp/$i.ghci; done
$ ghc -e 0 -ghci-script /tmp/1.ghci -ghci-script /tmp/2.ghci
2
1
0
$ ghc -e 0 -ghci-script /tmp/1.ghci -ghci-script /tmp/2.ghci -ignore-dot-ghci
0

-ghci-script are executed in reverse order and are ignored when -ignore-dot-ghci is specified, while I expected that:

  • -ghci-script are executed in the order they are specified;
  • -ignore-dot-ghci only ignores the default .ghci files but still executes the scripts passed by -ghci-script.

I would like to change the behavior to the expected ones. But in case there are users relying on the old behavior, then it might be necessary to introduce different flags.

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC hvr, simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information