Copyright | (c) Dima Szamozvancev |
---|---|
License | MIT |
Maintainer | ds709@cam.ac.uk |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Types and functions for handling and displaying composition errors.
- type PitchPair = (PitchType, PitchType)
- data DyadPair = DyP PitchPair PitchPair
- type family DyPair p1 p2 q1 q2 :: DyadPair where ...
- type family PpPC (pc :: PitchClass) :: ErrorMessage where ...
- type family PpAcc (acc :: Accidental) :: ErrorMessage where ...
- type family PpOct (oct :: OctaveNum) :: ErrorMessage where ...
- type family PpPitch (p :: PitchType) :: ErrorMessage where ...
- type family PpPitchPair (pp :: PitchPair) :: ErrorMessage where ...
- type family PpDyadPair (dp :: DyadPair) :: ErrorMessage where ...
- type family PitchError (t :: Symbol) (p :: PitchType) where ...
- type family PitchPairError (t :: Symbol) (p :: PitchPair) where ...
- type family MotionError (t :: Symbol) (d :: DyadPair) where ...
- type family ChordError (t1 :: Symbol) (r :: RootType) (t2 :: Symbol) where ...
Documentation
type family PpPC (pc :: PitchClass) :: ErrorMessage where ... Source #
Print pitch class type.
type family PpAcc (acc :: Accidental) :: ErrorMessage where ... Source #
Print accidental type.
type family PpOct (oct :: OctaveNum) :: ErrorMessage where ... Source #
Print octave type.
type family PpPitch (p :: PitchType) :: ErrorMessage where ... Source #
Print pitch type.
type family PpPitchPair (pp :: PitchPair) :: ErrorMessage where ... Source #
Print pitch pair.
type family PpDyadPair (dp :: DyadPair) :: ErrorMessage where ... Source #
Print dyad pair.
PpDyadPair (DyP d1 d2) = (PpPitchPair d1 :<>: Text ", then ") :<>: PpPitchPair d2 |
type family PitchError (t :: Symbol) (p :: PitchType) where ... Source #
Create an error message with a given text and pitch.
PitchError t p = TypeError (Text t :<>: PpPitch p) |
type family PitchPairError (t :: Symbol) (p :: PitchPair) where ... Source #
Create an error message with a given text and pair of pitches.
PitchPairError t p = TypeError (Text t :<>: PpPitchPair p) |
type family MotionError (t :: Symbol) (d :: DyadPair) where ... Source #
Create an error message with the given text and pair of dyads.
MotionError t p = TypeError (Text t :<>: PpDyadPair p) |
type family ChordError (t1 :: Symbol) (r :: RootType) (t2 :: Symbol) where ... Source #
Create an error message with the given text and chord root.
ChordError t1 r t2 = TypeError ((Text t1 :<>: PpPitch (RootToPitch r)) :<>: Text t2) |