Yes, correct. But I think ghci's errors are already distinguishable from `error`, e.g. this: ``` Prelude> :set -Wall Prelude> :load test [1 of 1] Compiling Main ( test.hs, interpreted ) test.hs:1:1: Warning: Top-level binding with no type signature: main :: IO () Ok, modules loaded: Main. Prelude> let main = asdasdasd <interactive>:6:12: Not in scope: ‘asdasdasd’ *Main> :load test2 [1 of 1] Compiling Main ( test2.hs, interpreted ) test2.hs:1:8: Not in scope: ‘foo’ Failed, modules loaded: none. Prelude> error "foo" *** Exception: foo ``` will change to: ``` Prelude> :set -Wall Prelude> :load test [1 of 1] Compiling Main ( test.hs, interpreted ) test.hs:1:1: Warning: Top-level binding with no type signature: main :: IO () Ok, modules loaded: Main. Prelude> let main = asdasdasd <interactive>:6:12: Not in scope: ‘asdasdasd’ *Main> :load test2 [1 of 1] Compiling Main ( test2.hs, interpreted ) test2.hs:1:8: Error: Not in scope: ‘foo’ Failed, modules loaded: none. Prelude> error "foo" *** Exception: foo ``` Don't think this will cause any trouble (well, except for current tests that check for output, which was mentioned in ticket #10021, but I hope it's not that big of a problem). On Tue, Jan 27, 2015 at 7:05 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Tue, Jan 27, 2015 at 12:02 PM, Konstantine Rybnikov <k-bx@k-bx.com> wrote:
Sorry, I didn't get what you mean. Do you mean `error` [0] function from Prelude? The discussion is currently not regarding runtime program behavior, nor it is about `error` function. It's rather regarding compiler output message on compilation failure, so it shouldn't get mixed with your program's runtime behavior in any way
...unless using runhaskell/runghc.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net