singleton-bool 0.1.6 → 0.1.7
raw patch · 3 files changed
+33/−7 lines, 3 filesdep ~basedep ~boringdep ~dec
Dependency ranges changed: base, boring, dec, deepseq, some
Files
- CHANGELOG.md +3/−0
- singleton-bool.cabal +10/−7
- src/Data/Singletons/Bool.hs +20/−0
CHANGELOG.md view
@@ -1,3 +1,6 @@+- 0.1.7+ - Add EqP and OrdP instances+ - 0.1.6 - Add `boring` instances - Add `some` (`GEq` etc) instances
singleton-bool.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: singleton-bool-version: 0.1.6+version: 0.1.7 synopsis: Type level booleans description: Type level booleans.@@ -25,8 +25,11 @@ || ==8.4.4 || ==8.6.5 || ==8.8.4- || ==8.10.4- || ==9.0.1+ || ==8.10.7+ || ==9.0.2+ || ==9.2.7+ || ==9.4.4+ || ==9.6.1 source-repository head type: git@@ -36,11 +39,11 @@ hs-source-dirs: src ghc-options: -Wall build-depends:- base >=4.7 && <4.16- , boring >=0.2 && <0.3- , dec >=0.0.3 && <0.1+ base >=4.7 && <4.19+ , boring >=0.2.1 && <0.3+ , dec >=0.0.5 && <0.1 , deepseq >=1.3 && <1.5- , some >=1.0.3 && <1.1+ , some >=1.0.4 && <1.1 exposed-modules: Data.Singletons.Bool default-language: Haskell2010
src/Data/Singletons/Bool.hs view
@@ -39,6 +39,11 @@ import Data.Type.Equality import Unsafe.Coerce (unsafeCoerce) +#if MIN_VERSION_some(1,0,5)+import Data.EqP (EqP (..))+import Data.OrdP (OrdP (..))+#endif+ import qualified Data.Some.Church as Church -- $setup@@ -187,6 +192,21 @@ [ (Church.mkSome SFalse, t) | ("SFalse", t) <- lex s ]++#if MIN_VERSION_some(1,0,5)+-- | @since 0.1.7+instance EqP SBool where+ eqp STrue STrue = True+ eqp SFalse SFalse = True+ eqp _ _ = False++-- | @since 0.1.7+instance OrdP SBool where+ comparep STrue STrue = EQ+ comparep SFalse SFalse = EQ+ comparep STrue SFalse = GT+ comparep SFalse STrue = LT+#endif ------------------------------------------------------------------------------- -- Discrete