Skip to content

Commit 4e085fa

Browse files
authored
Merge pull request #45 from endgame/cpp-option-ghc92
Cpp option ghc92
2 parents fbc33b5 + 94df9d0 commit 4e085fa

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.2', '9.0.1']
9+
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.2']
1010
os: ['ubuntu-latest', 'macos-latest']
1111
exclude:
1212
# There are some linker warnings in 802 on darwin that

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Revision history for patch
22

3+
## Unreleased
4+
5+
* Support GHC 9.2
6+
37
## 0.0.5.2 - 2022-01-09
48

59
* Correct field order of `PatchMapWithMove.NodeInfo`.

patch.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extra-source-files:
2222
ChangeLog.md
2323

2424
tested-with:
25-
GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1
25+
GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.2
2626
GHCJS ==8.4
2727

2828
flag split-these
@@ -33,15 +33,15 @@ flag split-these
3333
library
3434
hs-source-dirs: src
3535
default-language: Haskell2010
36-
build-depends: base >= 4.9 && < 4.16
36+
build-depends: base >= 4.9 && < 4.17
3737
, constraints-extras >= 0.3 && < 0.4
3838
, containers >= 0.6 && < 0.7
3939
, dependent-map >= 0.3 && < 0.5
4040
, dependent-sum >= 0.6 && < 0.8
41-
, lens >= 4.7 && < 5.1
41+
, lens >= 4.7 && < 5.2
4242
, indexed-traversable >= 0.1 && < 0.2
4343
, semigroupoids >= 4.0 && < 6
44-
, transformers >= 0.5.6.0 && < 0.6
44+
, transformers >= 0.5.6.0 && < 0.7
4545
, witherable >= 0.3 && < 0.5
4646

4747
if impl(ghc < 8.6) -- really, if base < 8.12
@@ -92,7 +92,7 @@ test-suite hlint
9292
, directory
9393
, filepath
9494
, filemanip
95-
, hlint (< 2.1 || >= 2.2.2) && < 3.4
95+
, hlint (< 2.1 || >= 2.2.2) && < 3.5
9696
if impl(ghcjs)
9797
buildable: False
9898

src/Data/Functor/Misc.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import Data.GADT.Compare
5050
import Data.GADT.Show
5151
import Data.IntMap (IntMap)
5252
import qualified Data.IntMap as IntMap
53+
import Data.Kind (Type)
5354
import Data.Map (Map)
5455
import qualified Data.Map as Map
5556
import Data.Some (Some, mkSome)
@@ -63,7 +64,7 @@ import Data.Typeable hiding (Refl)
6364

6465
-- | 'Const2' stores a value of a given type 'k' and ensures that a particular
6566
-- type 'v' is always given for the last type parameter
66-
data Const2 :: * -> x -> x -> * where
67+
data Const2 :: Type -> x -> x -> Type where
6768
Const2 :: k -> Const2 k v v
6869
deriving (Typeable)
6970

@@ -130,7 +131,7 @@ weakenDMapWith f = Map.fromDistinctAscList . map (\(k :=> v) -> (mkSome k, f v))
130131
-- | 'WrapArg' can be used to tag a value in one functor with a type
131132
-- representing another functor. This was primarily used with dependent-map <
132133
-- 0.2, in which the value type was not wrapped in a separate functor.
133-
data WrapArg :: (k -> *) -> (k -> *) -> * -> * where
134+
data WrapArg :: (k -> Type) -> (k -> Type) -> Type -> Type where
134135
WrapArg :: f a -> WrapArg g f (g a)
135136

136137
deriving instance Eq (f a) => Eq (WrapArg g f (g' a))

src/Data/Monoid/DecidablyEmpty.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ instance DecidablyEmpty (First a) where
6969
instance DecidablyEmpty (Last a) where
7070
isEmpty (Last a) = isNothing a
7171
deriving instance DecidablyEmpty a => DecidablyEmpty (Identity a)
72+
#if !MIN_VERSION_base(4,16,0)
7273
instance Semigroup a => DecidablyEmpty (Option a) where
7374
isEmpty (Option a) = isNothing a
75+
#endif
7476
deriving instance DecidablyEmpty m => DecidablyEmpty (WrappedMonoid m)
7577
instance (Ord a, Bounded a) => DecidablyEmpty (Max a)
7678
instance (Ord a, Bounded a) => DecidablyEmpty (Min a)

src/Data/Patch/DMapWithMove.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Data.Functor.Misc
3333
import Data.Functor.Product
3434
import Data.GADT.Compare (GEq (..), GCompare (..))
3535
import Data.GADT.Show (GShow, gshow)
36+
import Data.Kind (Type)
3637
import qualified Data.Map as Map
3738
import Data.Maybe
3839
import Data.Monoid.DecidablyEmpty
@@ -67,7 +68,7 @@ data NodeInfo k v a = NodeInfo
6768

6869
-- |Structure describing a particular change to a key, be it inserting a new key (@From_Insert@), updating an existing key (@From_Insert@ again), deleting a
6970
-- key (@From_Delete@), or moving a key (@From_Move@).
70-
data From (k :: a -> *) (v :: a -> *) :: a -> * where
71+
data From (k :: a -> Type) (v :: a -> Type) :: a -> Type where
7172
-- |Insert a new or update an existing key with the given value @v a@
7273
From_Insert :: v a -> From k v a
7374
-- |Delete the existing key

0 commit comments

Comments
 (0)