File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11dist-newstyle
2+ dist-mcabal
23.ghc.environment. *
34cabal.project.local
Original file line number Diff line number Diff line change @@ -45,22 +45,26 @@ library
4545 exposed-modules :
4646 Data.Tuple.OneTuple
4747 Data.Tuple.Solo
48- Data.Tuple.Solo.TH
48+
49+ if impl(ghc)
50+ exposed-modules :
51+ Data.Tuple.Solo.TH
52+ build-depends :
53+ template-haskell
4954
5055 hs-source-dirs : src
5156 build-depends :
5257 base >= 4.12 && < 4.23
53- , template-haskell
5458
5559 if impl(ghc >= 9.0 )
5660 build-depends : ghc-prim
5761 else
5862 build-depends : hashable >= 1.3.5.0 && < 1.6
5963
60- if !impl(ghc >= 9.0 )
64+ if impl(ghc) && !impl(ghc >= 9.0 )
6165 build-depends : foldable1-classes-compat >= 0.1 && < 0.2
6266
63- if !impl(ghc >= 9.2 )
67+ if impl(ghc) && !impl(ghc >= 9.2 )
6468 build-depends : base-orphans >= 0.8.6
6569
6670test-suite instances
@@ -73,13 +77,13 @@ test-suite instances
7377 , hashable
7478 , OneTuple
7579
76- if !impl(ghc >= 8.0 )
80+ if impl(ghc) && !impl(ghc >= 8.0 )
7781 build-depends :
7882 semigroups
7983 , transformers
8084 , transformers-compat
8185
82- if !impl(ghc >= 9.6 )
86+ if impl(ghc) && !impl(ghc >= 9.6 )
8387 build-depends : foldable1-classes-compat >= 0.1 && < 0.2
8488
8589test-suite th
Original file line number Diff line number Diff line change @@ -30,7 +30,22 @@ module Data.Tuple.Solo (
3030import Data.Orphans ()
3131#endif
3232
33- #if MIN_VERSION_base(4,18,0)
33+ #if defined(__MHS__)
34+ import Data.Tuple (Solo (MkSolo ), getSolo )
35+
36+ pattern Solo :: a -> Solo a
37+ pattern Solo a = Solo a
38+
39+ {-# COMPLETE Solo #-}
40+
41+ instance (Enum a ) => Enum (Solo a ) where
42+ succ = fmap succ
43+ pred = fmap pred
44+ toEnum = pure . toEnum
45+ fromEnum (MkSolo x) = fromEnum x
46+
47+
48+ #elif MIN_VERSION_base(4,18,0)
3449import GHC.Tuple (Solo (MkSolo , Solo ), getSolo )
3550
3651
You can’t perform that action at this time.
0 commit comments