Safe Haskell | Safe-Infered |
---|
- class C event where
- note :: C event => event -> Maybe (Channel, (Velocity, Pitch, Bool))
- program :: C event => event -> Maybe (Channel, Program)
- anyController :: C event => event -> Maybe (Channel, (Controller, Int))
- mode :: C event => event -> Maybe (Channel, T)
- pitchBend :: C event => event -> Maybe (Channel, Int)
- channelPressure :: C event => event -> Maybe (Channel, Int)
Documentation
class C event where
All methods have default implementations that return Nothing
.
This helps implementing event data types
that support only a subset of types of events.
Maybe a better approach is to provide type classes
for every type of event
and make C
a subclass of all of them.
anyController :: C event => event -> Maybe (Channel, (Controller, Int))
channelPressure :: C event => event -> Maybe (Channel, Int)