Skip to content

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

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

Merged
merged 1 commit into from
Nov 7, 2024
Merged
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: 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 #-}

{-|
Expand Down
4 changes: 4 additions & 0 deletions src/SDL/Input/Mouse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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
Expand All @@ -68,6 +68,10 @@
import Control.Applicative
#endif

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

data LocationMode
= AbsoluteLocation
| RelativeLocation
Expand Down Expand Up @@ -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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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)
Expand Down
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 (
Expand Down
Loading