fix bug caused by incomplete pattern in precedence function
typing in a string like "4 + sqrt(5)" would cause a crash because in the middle of typing "sqrt" the evaluator would treat 's' as an operator and try to compare it's precedence to the precedence of '+'. The precedence function did not match all patterns and this adds an otherwise case.
This commit is contained in:
@@ -103,6 +103,7 @@ precedence "<=" = 2
|
||||
precedence ">=" = 2
|
||||
precedence "==" = 2
|
||||
precedence "!=" = 2
|
||||
precedence _ = 6
|
||||
|
||||
|
||||
contains :: Eq a => [a] -> a -> Bool
|
||||
|
Reference in New Issue
Block a user