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
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>
The text was updated successfully, but these errors were encountered:
Here's a ghci session:
I don't like the blank lines here: they group the error with the next command, rather than with the offending line. How about:
The text was updated successfully, but these errors were encountered: