File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 0.4.3
2+
3+ - Use automatic flags for compatibility conditionals
4+
15# 0.4.1.1
26
37- Support GHC-7.2 and GHC-7.0.
Original file line number Diff line number Diff line change 11cabal-version : 1.12
22name : OneTuple
3- version : 0.4.2.1
3+ version : 0.4.3
44synopsis : Singleton Tuple
55category : Data
66description :
@@ -40,6 +40,16 @@ source-repository head
4040 type : git
4141 location : https://github.com/phadej/OneTuple.git
4242
43+ flag base-ge-4-15
44+ description : @base >= 4.15 @ (GHC-9.0)
45+ default : True
46+ manual : False
47+
48+ flag base-ge-4-16
49+ description : @base >= 4.16 @ (GHC-9.2)
50+ default : True
51+ manual : False
52+
4353library
4454 default-language : Haskell98
4555 exposed-modules :
@@ -52,17 +62,31 @@ library
5262 base >= 4.12 && < 4.23
5363 , template-haskell
5464
55- if impl(ghc >= 9.0 )
65+ if flag(base-ge-4-15 )
5666 build-depends : ghc-prim
67+
5768 else
5869 build-depends : hashable >= 1.3.5.0 && < 1.6
5970
60- if !impl(ghc >= 9.0 )
71+ if !flag(base-ge-4-15 )
6172 build-depends : foldable1-classes-compat >= 0.1 && < 0.2
6273
63- if !impl(ghc >= 9.2 )
74+ if !flag(base-ge-4-16 )
6475 build-depends : base-orphans >= 0.8.6
6576
77+ -- flag selection forcing conditionals
78+ if flag(base-ge-4-15)
79+ build-depends : base >= 4.15
80+
81+ else
82+ build-depends : base < 4.15
83+
84+ if flag(base-ge-4-16)
85+ build-depends : base >= 4.16
86+
87+ else
88+ build-depends : base < 4.16
89+
6690test-suite instances
6791 type : exitcode-stdio-1.0
6892 default-language : Haskell98
Original file line number Diff line number Diff line change 1- {-# LANGUAGE CPP #-}
2- #if __GLASGOW_HASKELL__ >= 708
31{-# LANGUAGE PatternSynonyms #-}
4- #endif
52-- | This is a module to help migration from @OneTuple@ to @Solo@.
63-- Migrate to use "Data.Tuple" from @base-4.16@ or "Data.Tuple.Solo" with all GHCs.
74--
@@ -10,9 +7,7 @@ module Data.Tuple.OneTuple
107{-# DEPRECATED "Use Data.Tuple.Solo" #-}
118(
129 OneTuple ,
13- #if __GLASGOW_HASKELL__ >= 708
1410 pattern OneTuple ,
15- #endif
1611 only,
1712) where
1813
@@ -23,13 +18,7 @@ type OneTuple = Solo
2318only :: OneTuple a -> a
2419only = getSolo
2520
26- #if __GLASGOW_HASKELL__ >= 708
27- #if __GLASGOW_HASKELL__ >= 710
2821pattern OneTuple :: a -> Solo a
29- #endif
3022pattern OneTuple a = MkSolo a
31- #endif
3223
33- #if __GLASGOW_HASKELL__ >= 800
3424{-# COMPLETE OneTuple #-}
35- #endif
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ pattern MkSolo a = Solo a
5454
5555{-# COMPLETE MkSolo #-}
5656
57+ -- !MIN_VERSION_base(4,15,0)
5758#else
5859
5960import Control.Applicative (Applicative (.. ))
Original file line number Diff line number Diff line change 11{-# LANGUAGE CPP #-}
2- #if __GLASGOW_HASKELL__ >= 800
32{-# OPTIONS_GHC -Wincomplete-patterns -Werror=incomplete-patterns #-}
4- #else
53{-# OPTIONS_GHC -fwarn-incomplete-patterns -Werror #-}
6- #endif
74module Main where
85
96import Control.Applicative (Applicative (.. ))
@@ -66,9 +63,7 @@ hasApplicative :: Applicative f => f a -> f a; hasApplicative x = x; testApplica
6663hasMonad :: Monad f => f a -> f a ; hasMonad x = x ; testMonad = hasMonad tup1
6764hasMonadFix :: MonadFix f => f a -> f a ; hasMonadFix x = x ; testMonadFix = hasMonadFix tup1
6865
69- #if MIN_VERSION_base(4,4,0)
7066hasMonadZip :: MonadZip f => f a -> f a ; hasMonadZip x = x ; testMonadZip = hasMonadZip tup1
71- #endif
7267
7368hasEq1 :: Eq1 f => f a -> f a ; hasEq1 x = x ; testEq1 = hasEq1 tup1
7469hasOrd1 :: Ord1 f => f a -> f a ; hasOrd1 x = x ; testOrd1 = hasOrd1 tup1
You can’t perform that action at this time.
0 commit comments