packages feed

singleton-bool 0.1.7 → 0.1.8

raw patch · 3 files changed

+21/−38 lines, 3 filesdep ~basedep ~boringdep ~dec

Dependency ranges changed: base, boring, dec, deepseq, some

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+- 0.1.8+    - Support GHC-8.6.5...9.10.1+ - 0.1.7     - Add EqP and OrdP instances 
singleton-bool.cabal view
@@ -1,6 +1,6 @@-cabal-version:      >=1.10+cabal-version:      2.2 name:               singleton-bool-version:            0.1.7+version:            0.1.8 synopsis:           Type level booleans description:   Type level booleans.@@ -8,28 +8,25 @@   @singletons@ package provides similar functionality,   but it has tight dependency constraints. -category:           Web+category:           Dependent Types homepage:           https://github.com/phadej/singleton-bool#readme bug-reports:        https://github.com/phadej/singleton-bool/issues author:             Oleg Grenrus <oleg.grenrus@iki.fi> maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>-license:            BSD3+license:            BSD-3-Clause license-file:       LICENSE build-type:         Simple extra-source-files: CHANGELOG.md tested-with:-  GHC ==7.8.4-   || ==7.10.3-   || ==8.0.2-   || ==8.2.2-   || ==8.4.4-   || ==8.6.5+  GHC ==8.6.5    || ==8.8.4    || ==8.10.7    || ==9.0.2-   || ==9.2.7-   || ==9.4.4-   || ==9.6.1+   || ==9.2.8+   || ==9.4.8+   || ==9.6.5+   || ==9.8.2+   || ==9.10.1  source-repository head   type:     git@@ -39,11 +36,13 @@   hs-source-dirs:   src   ghc-options:      -Wall   build-depends:-      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.4 && <1.1+    , base     >=4.12.0.0 && <4.21+    , deepseq  >=1.4.4.0  && <1.6++  build-depends:+    , boring  ^>=0.2.2+    , dec     ^>=0.0.6+    , some    ^>=1.0.6    exposed-modules:  Data.Singletons.Bool   default-language: Haskell2010
src/Data/Singletons/Bool.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP                 #-} {-# LANGUAGE DataKinds           #-} {-# LANGUAGE EmptyCase           #-} {-# LANGUAGE FlexibleContexts    #-}@@ -7,9 +6,7 @@ {-# LANGUAGE RankNTypes          #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators       #-}-#if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -Wno-redundant-constraints #-}-#endif -- | Additions to "Data.Type.Bool". module Data.Singletons.Bool (     SBool(..),@@ -39,10 +36,8 @@ 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 @@ -193,7 +188,6 @@         | ("SFalse", t) <- lex s         ] -#if MIN_VERSION_some(1,0,5) -- | @since 0.1.7 instance EqP SBool where     eqp STrue  STrue  = True@@ -206,7 +200,6 @@     comparep SFalse SFalse = EQ     comparep STrue  SFalse = GT     comparep SFalse STrue  = LT-#endif  ------------------------------------------------------------------------------- -- Discrete@@ -255,22 +248,10 @@ trivialRefl :: () :~: () trivialRefl = Refl --- GHC 8.10+ requires that all kind variables be explicitly quantified after--- a `forall`. Technically, GHC has had the ability to do this since GHC 8.0,--- but GHC 8.0-8.4 require enabling TypeInType to do. To avoid having to faff--- around with CPP to enable TypeInType on certain GHC versions, we only--- explicitly quantify kind variables on GHC 8.6 or later, since those versions--- do not require TypeInType, only PolyKinds.-# if __GLASGOW_HASKELL__ >= 806-#  define KVS(kvs) kvs-# else-#  define KVS(kvs)-# endif- -- | Useful combination of 'sbool' and 'eqToRefl' -- -- @since 0.1.2.0-sboolEqRefl :: forall KVS(k) (a :: k) (b :: k). SBoolI (a == b) => Maybe (a :~: b)+sboolEqRefl :: forall k (a :: k) (b :: k). SBoolI (a == b) => Maybe (a :~: b) sboolEqRefl = case sbool :: SBool (a == b) of     STrue  -> Just eqToRefl     SFalse -> Nothing