| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Sound.Frame
- class C y where
- numberOfChannelsFoldable :: (C y, Foldable f) => f y -> Int
- sizeOfElementFoldable :: (C y, Foldable f) => f y -> Int
- sizeOfElementType :: C y => f y -> Int
- paddedSizeOf :: Storable a => a -> Int
- withSignal :: (y -> a) -> sig y -> a
Documentation
This is a class for nested tuples used as sample frames.
Should we make Storable a superclass of C?
Minimal complete definition
Methods
numberOfChannels :: y -> Int #
The argument is not touched and can be undefined
sizeOfElement :: y -> Int #
Size of elements.
In a nested record type, like Stereo (Stereo a),
it is the size of the atomic element, in our example a.
We assume that the atomic element values all have the same size,
such that sizeOfElement undefined is defined.
numberOfChannelsFoldable :: (C y, Foldable f) => f y -> Int #
Default implementations for a foldable Frame.
sizeOfElementFoldable :: (C y, Foldable f) => f y -> Int #
sizeOfElementType :: C y => f y -> Int #
Returns the size of an undefined element.
This might be more efficient than sizeOfElementFoldable.
paddedSizeOf :: Storable a => a -> Int #
Space that an element consumes in a Storable Array. This is space for the element plus padding.
withSignal :: (y -> a) -> sig y -> a #