Closed meditans closed 9 years ago
That is because you defined isLeap in terms of the diatonic steps, with:
isLeap (Interval (a, d)) = (abs d) > 2
But as
m3 ^. (from interval') = (ChromaticSteps = -1, DiatonicSteps = 2)
The correct definition would be, I think:
isLeap (Interval (a, d)) = (abs d) > 1
We should also write some test to avoid similar errors. I could do a PR in a few days, but in the meantime you can correct it, if you want.
It should be true. The haddock documentation reports:
Returns whether the given interval is a leap (larger than a second). Only the diatonic number is taken into account, so _A2 is considered a step and m3 a leap, even though they have the same number of semitones.
Also, isStep m3 = True
Steps to reproduce the problem: $ ghci