Non-exhaustive patterns [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Given I have the following code: data Note = C | Db | D | Eb | E | F | Gb | G | Ab | A | Bb | B deriving (Show, Eq, Ord, Enum) next :: Note -> Note next B = C next n = succ n previous :: Note -> Note previous C = B previous n = pred n resolveAscendingInterval :: Int -> Note -> Note resolveAscendingInterval 0