You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the Interpreter error messages occur twice.
For instance considering the following file Test.hs.
moduleTestwhereimportPreludemain::IO()
main =do hSetBuffering stdout NoBufferingputStr"This leads to an error"
When calling the interpreter within the terminal in the following way:
$ stack ghci
Using main module: 1. Package `test' component exe:test-exe with main-is file: /private/tmp/test/app/Main.hs
Building all executables for `test' once. After a successful build of all of them, only specified executables will be rebuilt.
test-0.1.0.0: configure (lib + exe)
Configuring test-0.1.0.0...
test-0.1.0.0: initial-build-steps (lib + exe)
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded -O2
Configuring GHCi with the following packages: test
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling Lib ( Lib.hs, interpreted )
[2 of 2] Compiling Main ( /private/tmp/test/app/Main.hs, interpreted )
Ok, two modules loaded.
Loaded GHCi configuration from /private/var/folders/0k/rhm0fs9j0m9g0syf1rh5nmx40000gn/T/haskell-stack-ghci/56899571/ghci-script
*Main Lib> :set -package hint
package flags have changed, resetting and loading new packages...
Prelude> :m +Language.Haskell.Interpreter
Prelude Language.Haskell.Interpreter> :{
Prelude Language.Haskell.Interpreter| compiler :: MonadInterpreter m => [String] -> m ()
Prelude Language.Haskell.Interpreter| compiler modules = do
Prelude Language.Haskell.Interpreter| set [installedModulesInScope := False]
Prelude Language.Haskell.Interpreter| loadModules modules
Prelude Language.Haskell.Interpreter| setTopLevelModules modules
Prelude Language.Haskell.Interpreter| :}
Prelude Language.Haskell.Interpreter> runInterpreter (compiler ["Test"])
The response contains the (correct) error message duplicated:
Left (WontCompile [GhcError {errMsg ="Test.hs:5:8: error:\n Unexpected do block in function application:\n do hSetBuffering stdout NoBuffering\n You could write it with parentheses\n Or perhaps you meant to enable BlockArguments?"},GhcError {errMsg ="Test.hs:5:8: error:\n Unexpected do block in function application:\n do hSetBuffering stdout NoBuffering\n You could write it with parentheses\n Or perhaps you meant to enable BlockArguments?"}])
The text was updated successfully, but these errors were encountered:
When running the Interpreter error messages occur twice.
For instance considering the following file
Test.hs
.When calling the interpreter within the terminal in the following way:
The response contains the (correct) error message duplicated:
The text was updated successfully, but these errors were encountered: