Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compatibility with base < 4.11 (#310) #311

Merged
merged 1 commit into from
Nov 7, 2024
Merged
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: 3 additions & 0 deletions src/SDL/Input/Keyboard/Codes.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}

#if MIN_VERSION_base(4,11,0)
{-# OPTIONS_GHC -fno-warn-missing-pattern-synonym-signatures #-}
#endif
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}

{-|
4 changes: 4 additions & 0 deletions src/SDL/Input/Mouse.hs
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Bits
import Data.Bool

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-8.8

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-8.10

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-8.8

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-9.0

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-8.10

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-9.2

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-9.0

The import of ‘Data.Bool’ is redundant

Check warning on line 46 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-9.2

The import of ‘Data.Bool’ is redundant
import Data.Data (Data)
import Data.List (nub)
import Data.StateVar
@@ -68,6 +68,10 @@
import Control.Applicative
#endif

#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>))
#endif

data LocationMode
= AbsoluteLocation
| RelativeLocation
@@ -296,7 +300,7 @@
=> Point V2 CInt -- ^ The X- and Y-axis location of the upper left corner of the cursor relative to the actual mouse position
-> [[Char]]
-> m Cursor
createCursorFrom point source = do

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-8.8

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-8.10

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-8.8

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-9.0

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-8.10

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / ubuntu-latest ghc-9.2

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-9.0

This binding for ‘point’ shadows the existing binding

Check warning on line 303 in src/SDL/Input/Mouse.hs

GitHub Actions / macOS-latest ghc-9.2

This binding for ‘point’ shadows the existing binding
createCursor color mask (V2 w h) point
where
h = fromIntegral (length source)
3 changes: 3 additions & 0 deletions src/SDL/Raw/Enum.hsc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PatternSynonyms #-}

#if MIN_VERSION_base(4,11,0)
{-# OPTIONS_GHC -fno-warn-missing-pattern-synonym-signatures #-}
#endif
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}

module SDL.Raw.Enum (

Unchanged files with check annotations Beta

import Foreign.C (withCString)
import Foreign.C.Types
import Foreign.ForeignPtr
import Foreign.Marshal.Alloc

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.8

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.10

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.8

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.0

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.10

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.2

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.0

The import of ‘Foreign.Marshal.Alloc’ is redundant

Check warning on line 43 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.2

The import of ‘Foreign.Marshal.Alloc’ is redundant
import Foreign.Ptr
import Foreign.Storable

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.8

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.10

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.8

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.0

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.10

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.2

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.0

The import of ‘Foreign.Storable’ is redundant

Check warning on line 45 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.2

The import of ‘Foreign.Storable’ is redundant
import GHC.Generics (Generic)
import GHC.Int (Int32)

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.8

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.10

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.8

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.0

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.10

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.2

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.0

The import of ‘GHC.Int’ is redundant

Check warning on line 47 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.2

The import of ‘GHC.Int’ is redundant
import SDL.Input.Joystick (numJoysticks)
import SDL.Internal.Exception
import SDL.Internal.Numbered
import SDL.Internal.Types
import SDL.Vect

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.8

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-8.10

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.8

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.0

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-8.10

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / ubuntu-latest ghc-9.2

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.0

The import of ‘SDL.Vect’ is redundant

Check warning on line 52 in src/SDL/Input/GameController.hs

GitHub Actions / macOS-latest ghc-9.2

The import of ‘SDL.Vect’ is redundant
import qualified Data.ByteString as BS
import qualified Data.ByteString.Internal as BSI
import qualified SDL.Raw as Raw