type-list 0.0.0.0 → 0.0.0.1
raw patch · 2 files changed
+7/−3 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- src/Data/Type/List.hs +5/−1
- type-list.cabal +2/−2
src/Data/Type/List.hs view
@@ -17,7 +17,8 @@ License : BSD3 Maintainer : marcin.jan.mrotek@gmail.com -Operations on type-level lists and tuples, together with their curried versions - the more apostrophes, the more arguments are missing from the function. Curried type functions can be evaulated by the 'TyFun' type family from "Data.Singletons".+Operations on type-level lists and tuples, together with their curried versions - the more apostrophes, the more arguments are missing from the function.+Curried type functions can be evaluated by the 'Apply' type family from "Data.Singletons". -} module Data.Type.List where@@ -94,6 +95,7 @@ type instance Apply Remove'' x = Remove' x type instance Apply (Remove' x) xs = Remove x xs +-- |Set difference of two lists. type family Difference xs ys where Difference '[] ys = ys Difference (x ': xs) ys = Remove x (Difference xs ys)@@ -107,10 +109,12 @@ type instance Apply Difference'' xs = Difference' xs type instance Apply (Difference' xs) ys = Difference xs ys +-- |Helper function for Reverse. type family ReverseAcc xs acc where ReverseAcc '[] acc = acc ReverseAcc (x ': xs) acc = ReverseAcc xs (x ': acc) +-- |Reverse a type list. type family Reverse xs where Reverse xs = ReverseAcc xs '[]
type-list.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: type-list-version: 0.0.0.0+version: 0.0.0.1 synopsis: Operations on type-level lists and tuples. description: Operations on type-level lists and tuples, together with their curried versions. license: BSD3@@ -22,7 +22,7 @@ exposed-modules: Data.Type.List -- other-modules: -- other-extensions: - build-depends: base >=4.7 && <4.8+ build-depends: base >=4.7 && <4.9 ,singletons hs-source-dirs: src default-language: Haskell2010