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
runInterpreter in 0.9.0.6 with GHC < 9.2 on a module that fails to compile will send errors to stderr and return Left (UnknownError "Got no error message") instead of Left (WontCompile ...).
This currently fails with vanilla lts-19.11, but I wanted to verify across GHC versions as well. This is the script I used to test this:
##########################
hint: 0.9.0.5, ghc: 8.10
[...]
Left (WontCompile [GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"},GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"}])
[...]
##########################
hint: 0.9.0.5, ghc: 9.0
[...]
Left (WontCompile [GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"},GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"}])
[...]
##########################
hint: 0.9.0.5, ghc: 9.2
[...]
Left (WontCompile [GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"},GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"}])
[...]
##########################
hint: 0.9.0.6, ghc: 8.10
[...]
Foo.hs:2:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘()’
• In the expression: ()
In an equation for ‘x’: x = ()
|
2 | x = ()
| ^^
Foo.hs:2:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘()’
• In the expression: ()
In an equation for ‘x’: x = ()
|
2 | x = ()
| ^^
Left (UnknownError "Got no error message")
[...]
##########################
hint: 0.9.0.6, ghc: 9.0
[...]
Foo.hs:2:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘()’
• In the expression: ()
In an equation for ‘x’: x = ()
|
2 | x = ()
| ^^
Foo.hs:2:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘()’
• In the expression: ()
In an equation for ‘x’: x = ()
|
2 | x = ()
| ^^
Left (UnknownError "Got no error message")
[...]
##########################
hint: 0.9.0.6, ghc: 9.2
[...]
Left (WontCompile [GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"},GhcError {errMsg = "Foo.hs:2:5: error:\n \8226 Couldn't match expected type \8216Int\8217 with actual type \8216()\8217\n \8226 In the expression: ()\n In an equation for \8216x\8217: x = ()"}])
[...]
The text was updated successfully, but these errors were encountered:
runInterpreter
in 0.9.0.6 with GHC < 9.2 on a module that fails to compile will send errors to stderr and returnLeft (UnknownError "Got no error message")
instead ofLeft (WontCompile ...)
.This currently fails with vanilla
lts-19.11
, but I wanted to verify across GHC versions as well. This is the script I used to test this:on this file:
The text was updated successfully, but these errors were encountered: