Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sdl2-image.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ library
bytestring >= 0.10.4.0,
sdl2 >= 2.0,
text >= 1.1.0.0,
template-haskell
template-haskell,
th-abstraction >= 0.4.0.0

default-language:
Haskell2010
Expand Down
7 changes: 4 additions & 3 deletions src/SDL/Raw/Helper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ inlined MonadIO variant. Use this to simplify the package's SDL.Raw.* modules.

module SDL.Raw.Helper (liftF) where

import Control.Monad (replicateM)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad (replicateM)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Language.Haskell.TH
import Language.Haskell.TH.Datatype.TyVarBndr (plainTVSpecified)

-- | Given a name @fname@, a name of a C function @cname@ and the desired
-- Haskell type @ftype@, this function generates:
Expand Down Expand Up @@ -81,7 +82,7 @@ liftType = \case
m <- newName "m"
return $
ForallT
[PlainTV m]
[plainTVSpecified m]
[AppT (ConT ''MonadIO) $ VarT m]
(AppT (VarT m) t)
t -> return t