I have been trying to optimize some research I was doing in my spare time.
To spare complexity, it involves music-- I have a class, defining each note in an octave, and I want to write a function that will convert between two notes and an interval-- so, for instance:
Foo As {- A sharp-- can't use # -} B = 1
because in the standard scale, A# and B are one semitone apart.
My question, however, boils primarily down to this: Is there a way to make
Foo :: Note -> Note -> Int
Foo a b = a-b
work?