In Haskell why pattern matching expects list to have round braces but not square braces when it is not empty? Why does it not follow the same convention when it tries to pattern match with empty list [] (square braces). Shouldn't the round braces reserved exclusively for tuples?
For example - below does not work
third :: Integral a => [a] -> a
third xs = case xs of
[] -> 0
[_:_:x:_] -> x
otherwise -> 0
But this works
third :: Integral a => [a] -> a
third xs = case xs of
[] -> 0
(_:_:x:_) -> x
otherwise -> 0