Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put blank line after the error #538

Closed
monoidal opened this issue Nov 17, 2022 · 2 comments
Closed

Put blank line after the error #538

monoidal opened this issue Nov 17, 2022 · 2 comments

Comments

@monoidal
Copy link
Member

Here's a ghci session:

ghci> not 'a'

<interactive>:1:5: error:
    • Couldn't match expected type ‘Bool’ with actual type ‘Char’
    • In the first argument of ‘not’, namely ‘'a'’
      In the expression: not 'a'
      In an equation for ‘it’: it = not 'a'
ghci> 'a' + 'b'

<interactive>:2:5: error:
    • No instance for (Num Char) arising from a use of ‘+’
    • In the expression: 'a' + 'b'
      In an equation for ‘it’: it = 'a' + 'b'
ghci> [] []

<interactive>:3:1: error:
    • Couldn't match expected type: [a1] -> t
                  with actual type: [a0]
    • The function ‘[]’ is applied to one value argument,
        but its type ‘[a0]’ has none
      In the expression: [] []
      In an equation for ‘it’: it = [] []
    • Relevant bindings include it :: t (bound at <interactive>:3:1)
ghci>

I don't like the blank lines here: they group the error with the next command, rather than with the offending line. How about:

ghci> not 'a'
<interactive>:1:5: error:
    • Couldn't match expected type ‘Bool’ with actual type ‘Char’
    • In the first argument of ‘not’, namely ‘'a'’
      In the expression: not 'a'
      In an equation for ‘it’: it = not 'a'

ghci> 'a' + 'b'
<interactive>:2:5: error:
    • No instance for (Num Char) arising from a use of ‘+’
    • In the expression: 'a' + 'b'
      In an equation for ‘it’: it = 'a' + 'b'

ghci> [] []
<interactive>:3:1: error:
    • Couldn't match expected type: [a1] -> t
                  with actual type: [a0]
    • The function ‘[]’ is applied to one value argument,
        but its type ‘[a0]’ has none
      In the expression: [] []
      In an equation for ‘it’: it = [] []
    • Relevant bindings include it :: t (bound at <interactive>:3:1)

ghci>
@goldfirere
Copy link
Collaborator

Yes, let's just do this! 👍

@monoidal
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants