world-peace 1.0.1.0 → 1.0.2.0
raw patch · 5 files changed
+12/−17 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- src/Data/WorldPeace/Product.hs +4/−5
- src/Data/WorldPeace/Union.hs +1/−10
- stack.yaml +1/−1
- world-peace.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,8 @@+## 1.0.2.0++* Get building on GHC-8.10 by quantifying kind in some type class instances.+ Thanks [@ocharles](https://github.com/ocharles)!+ [#8](https://github.com/cdepillabout/world-peace/pull/8) ## 1.0.1.0
src/Data/WorldPeace/Product.hs view
@@ -53,22 +53,22 @@ toProduct :: tuple -> Product f as -- | Convert a single value into a 'Product'.-instance forall (f :: u -> *) (a :: u). ToProduct (f a) f '[a] where+instance forall u (f :: u -> *) (a :: u). ToProduct (f a) f '[a] where toProduct :: f a -> Product f '[a] toProduct fa = Cons fa Nil -- | Convert a tuple into a 'Product'.-instance forall (f :: u -> *) (a :: u) (b :: u). ToProduct (f a, f b) f '[a, b] where+instance forall u (f :: u -> *) (a :: u) (b :: u). ToProduct (f a, f b) f '[a, b] where toProduct :: (f a, f b) -> Product f '[a, b] toProduct (fa, fb) = Cons fa $ Cons fb Nil -- | Convert a 3-tuple into a 'Product'.-instance forall (f :: u -> *) (a :: u) (b :: u) (c :: u). ToProduct (f a, f b, f c) f '[a, b, c] where+instance forall u (f :: u -> *) (a :: u) (b :: u) (c :: u). ToProduct (f a, f b, f c) f '[a, b, c] where toProduct :: (f a, f b, f c) -> Product f '[a, b, c] toProduct (fa, fb, fc) = Cons fa $ Cons fb $ Cons fc Nil -- | Convert a 4-tuple into a 'Product'.-instance forall (f :: u -> *) (a :: u) (b :: u) (c :: u) (d :: u). ToProduct (f a, f b, f c, f d) f '[a, b, c, d] where+instance forall u (f :: u -> *) (a :: u) (b :: u) (c :: u) (d :: u). ToProduct (f a, f b, f c, f d) f '[a, b, c, d] where toProduct :: (f a, f b, f c, f d) -> Product f '[a, b, c, d] toProduct (fa, fb, fc, fd) = Cons fa $ Cons fb $ Cons fc $ Cons fd Nil @@ -150,4 +150,3 @@ showsPrec :: Int -> (Product f (a ': as)) -> String -> String showsPrec n (Cons fa prod) = showParen (n > 10) $ showString "Cons " . showsPrec 11 fa . showString " " . showsPrec 11 prod-
src/Data/WorldPeace/Union.hs view
@@ -80,6 +80,7 @@ import Data.Functor.Identity (Identity(Identity, runIdentity)) import Data.Kind (Constraint) import Data.Proxy+import Data.Type.Bool (If) import Data.Typeable (Typeable) import GHC.TypeLits (ErrorMessage(..), TypeError) import Text.Read (Read(readPrec), ReadPrec, (<++))@@ -144,16 +145,6 @@ type family CheckElemIsMember (a :: k) (as :: [k]) :: Constraint where CheckElemIsMember a as = If (Elem a as) (() :: Constraint) (TypeError (NoElementError a as))---- | Type-level @if@.------ >>> Refl :: If 'True String Double :~: String--- Refl--- >>> Refl :: If 'False String Double :~: Double--- Refl-type family If (bool :: Bool) (thenCase :: k) (elseCase :: k) :: k where- If 'True thenCase _ = thenCase- If 'False _ elseCase = elseCase -- | Type-level version of the 'elem' function. --
stack.yaml view
@@ -1,7 +1,7 @@ # For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)-resolver: lts-13.27+resolver: lts-16.2 # Local packages, usually specified by relative directory name packages:
world-peace.cabal view
@@ -1,5 +1,5 @@ name: world-peace-version: 1.0.1.0+version: 1.0.2.0 synopsis: Open Union and Open Product Types description: Please see <https://github.com/cdepillabout/world-peace#readme README.md>. homepage: https://github.com/cdepillabout/world-peace