Skip to content

Commit 5284288

Browse files
authored
Fix StarIsType deprecation warning (#248)
1 parent 0ab4ce1 commit 5284288

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

sdl2.cabal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ library
138138
build-depends:
139139
linear >= 1.10.1.2 && < 1.22
140140

141+
if impl(ghc >= 8.6)
142+
default-extensions: NoStarIsType
143+
141144
default-language:
142145
Haskell2010
143146

src/SDL/Audio.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ import Data.Foldable (Foldable)
9898
import Data.Traversable (Traversable)
9999
#endif
100100

101+
#if MIN_VERSION_base(4,12,0)
102+
import Data.Kind (Type)
103+
#else
104+
# define Type *
105+
#endif
106+
101107
{-
102108
103109
$audioDevice
@@ -213,7 +219,7 @@ openAudioDevice OpenDeviceSpec{..} = liftIO $
213219
audioFormatStorable FloatingBEAudio = Dict
214220
audioFormatStorable FloatingNativeAudio = Dict
215221

216-
data Dict :: Constraint -> * where
222+
data Dict :: Constraint -> Type where
217223
Dict :: c => Dict c
218224

219225
-- |

src/SDL/Hint.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ data VideoWinD3DCompilerOptions
141141
-- the 'HasSetter' interface is fairly relaxed - if a hint cannot be set, the
142142
-- failure will be silently discarded. For more feedback and control when setting
143143
-- hints, see 'setHintWithPriority'.
144-
data Hint :: * -> * where
144+
data Hint v where
145145
HintAccelerometerAsJoystick :: Hint AccelerometerJoystickOptions
146146
HintFramebufferAcceleration :: Hint FramebufferAccelerationOptions
147147
HintMacCTRLClick :: Hint MacCTRLClickOptions

0 commit comments

Comments
 (0)