ghci -XSafe fails in an inscrutable way
Trying to run ghci -XSafe
produces the following output:
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help
<interactive>:1:6: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:30: error:
Not in scope: ‘System.IO.stdin’
No module named ‘System.IO’ is imported.
<interactive>:1:46: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:70: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:94: error:
Not in scope: ‘System.IO.stdout’
No module named ‘System.IO’ is imported.
<interactive>:1:111: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:135: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.
<interactive>:1:159: error:
Not in scope: ‘System.IO.stderr’
No module named ‘System.IO’ is imported.
<interactive>:1:176: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.
I'm not sure whether this should work, but in any case the error message is horrible. I tried adding -trust base
to no avail.
For comparison, ghc-7.10.3 starts with no trouble:
> ghci -XSafe
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
Prelude>
(Motivation: I'm using ghci in Safe mode to track down import problems with SafeHaskell. As a workaround, I can use :set -XSafe
after ghci's startup is done.)
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |