Skip to content

Commit 9b23751

Browse files
evanrinehartdpwiz
authored andcommitted
AudioSpec now exports the audioSpecSamples field and the constructor
The main problem was the audioSpecFormat field has a hidden type variable and the AudioSpec constructor was not exported. This means there was no way to access the audioSpecFormat field. i.e. • Cannot use record selector ‘audioSpecFormat’ as a function due to escaped type variables Probable fix: use pattern-matching syntax instead (Which requires the constructor to be exported.) At the same time, the audioSpecSamples field was not exported either. Maybe there was a mix up. Regardless, without the constructor and audioSpecFormat field we can't pattern match to get the field. And nothing is wrong with the samples field. So now all fields and the constructor for AudioSpec are exported from Audio.hs
1 parent 267a291 commit 9b23751

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/SDL/Audio.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,7 @@ module SDL.Audio
5454
, getAudioDeviceNames
5555

5656
-- * 'AudioSpec'
57-
, AudioSpec
58-
, audioSpecFreq
59-
, audioSpecFormat
60-
, audioSpecChannels
61-
, audioSpecSilence
62-
, audioSpecSize
63-
, audioSpecCallback
57+
, AudioSpec(..)
6458

6559
-- * Audio Drivers
6660
, getAudioDrivers

0 commit comments

Comments
 (0)