packages feed

haskus-utils-types 1.0 → 1.1

raw patch · 4 files changed

+20/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

− CHANGES
haskus-utils-types.cabal view
@@ -1,19 +1,17 @@-name: haskus-utils-types-version: 1.0 cabal-version: >=1.20-build-type: Simple+name: haskus-utils-types+version: 1.1 license: BSD3 license-file: LICENSE copyright: Sylvain Henry 2018 maintainer: sylvain@haskus.fr+author: Sylvain Henry homepage: http://www.haskus.org synopsis: Haskus utility modules description:     Haskus types utility modules category: System-author: Sylvain Henry-extra-source-files:-    CHANGES+build-type: Simple  source-repository head     type: git@@ -24,9 +22,8 @@         Haskus.Utils.Types         Haskus.Utils.Types.List         Haskus.Utils.Types.Generics-    build-depends:-        base >=4.9 && <4.12-    default-language: Haskell2010     hs-source-dirs: src/lib+    default-language: Haskell2010     ghc-options: -Wall-+    build-depends:+        base >=4.9 && <4.12
src/lib/Haskus/Utils/Types.hs view
@@ -6,6 +6,13 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE PolyKinds #-}+{-# LANGUAGE CPP #-}++-- We need this otherwise GHC chokes on the export of+-- "type (*)"+#if MIN_VERSION_GLASGOW_HASKELL (8,6,0,0)+{-# LANGUAGE NoStarIsType #-}+#endif  -- | Common type functions module Haskus.Utils.Types
src/lib/Haskus/Utils/Types/List.hs view
@@ -44,6 +44,7 @@    , MaybeIndexOf    , Index    , Union+   , Complement    , Product    , Member    , Member'@@ -278,6 +279,11 @@ -- | Union two lists type family Union (xs :: [k]) (ys :: [k]) :: [k] where    Union xs ys = Nub (Concat xs ys)++-- | Complement xs \ ys+type family Complement (xs :: [k]) (ys :: [k]) :: [k] where+   Complement xs '[]    = xs+   Complement xs (y:ys) = Complement (Filter y xs) ys  -- | Product of two lists type family Product (xs :: [*]) (ys :: [*]) :: [*] where