Skip to content

Commit 8d68a46

Browse files
committed
Use th-abstraction to get compatible with GHC 9.0.1
while maintaining backward compatibility.
1 parent 8ba69b0 commit 8d68a46

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sdl2-ttf.cabal

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sdl2-ttf
2-
version: 2.1.1
2+
version: 2.1.2
33
synopsis: Bindings to SDL2_ttf.
44
description: Haskell bindings to SDL2_ttf C++ library <http://www.libsdl.org/projects/SDL_ttf/>.
55
bug-reports: https://github.com/haskell-game/sdl2-ttf/issues
@@ -14,7 +14,8 @@ copyright: Copyright © 2013-2020 Ömer Sinan Ağacan, Siniša Biđin, Rongc
1414
category: Font, Foreign binding, Graphics
1515
build-type: Simple
1616
cabal-version: >=1.10
17-
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2, GHC==8.6.5, GHC==8.8.3
17+
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5,
18+
GHC==8.8.4, GHC==8.10.4, GHC==9.0.1
1819

1920
source-repository head
2021
type: git
@@ -46,6 +47,7 @@ library
4647
sdl2 >= 2.2,
4748
template-haskell,
4849
text >= 1.1.0.0,
50+
th-abstraction >= 0.4.0.0,
4951
transformers >= 0.4
5052

5153
default-language:

src/SDL/Raw/Helper.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module SDL.Raw.Helper (liftF) where
1919
import Control.Monad (replicateM)
2020
import Control.Monad.IO.Class (MonadIO, liftIO)
2121
import Language.Haskell.TH
22+
import Language.Haskell.TH.Datatype.TyVarBndr (plainTVSpecified)
2223

2324
-- | Given a name @fname@, a name of a C function @cname@ and the desired
2425
-- Haskell type @ftype@, this function generates:
@@ -80,7 +81,7 @@ liftType = \case
8081
m <- newName "m"
8182
return $
8283
ForallT
83-
[PlainTV m]
84+
[plainTVSpecified m]
8485
[AppT (ConT ''MonadIO) $ VarT m]
8586
(AppT (VarT m) t)
8687
t -> return t

0 commit comments

Comments
 (0)