File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
2
3
-- |
3
4
-- Module : Z3.Opts
@@ -52,15 +53,28 @@ import Data.Fixed ( Fixed )
52
53
import qualified Data.Fixed as Fixed
53
54
import Data.Monoid ( Monoid (.. ) )
54
55
56
+ #if MIN_VERSION_base(4,9,0)
57
+ import Data.Semigroup ( Semigroup (.. ) )
58
+ #endif
59
+
55
60
---------------------------------------------------------------------
56
61
-- Configuration
57
62
58
63
-- | Z3 configuration.
59
64
newtype Opts = Opts [Opt ]
60
65
66
+ #if MIN_VERSION_base(4,9,0)
67
+ instance Semigroup Opts where
68
+ Opts ps1 <> Opts ps2 = Opts (ps1 ++ ps2)
69
+ #endif
70
+
61
71
instance Monoid Opts where
62
72
mempty = Opts []
63
- mappend (Opts ps1) (Opts ps2) = Opts (ps1++ ps2)
73
+ #if MIN_VERSION_base(4,9,0)
74
+ mappend = (<>)
75
+ #else
76
+ Opts ps1 `mappend` Opts ps2 = Opts (ps1 ++ ps2)
77
+ #endif
64
78
65
79
singleton :: Opt -> Opts
66
80
singleton o = Opts [o]
You can’t perform that action at this time.
0 commit comments