@@ -1,14 +1,14 @@
1name: type-level-sets
1name: type-level-sets
2version: 0.8.9.0
2version: 0.8.9.0
3synopsis: Type-level sets and finite maps (with value-level counterparts)
3synopsis: Type-level sets and finite maps (with value-level counterparts)
4−description:
4+description:
5 This package provides type-level sets (no duplicates, sorted to provide a normal form) via 'Set' and type-level
5 This package provides type-level sets (no duplicates, sorted to provide a normal form) via 'Set' and type-level
6 finite maps via 'Map', with value-level counterparts.
6 finite maps via 'Map', with value-level counterparts.
8− Described in the paper \"Embedding effect systems in Haskell\" by Dominic Orchard
8+ Described in the paper \"Embedding effect systems in Haskell\" by Dominic Orchard
9− and Tomas Petricek <http://www.cl.cam.ac.uk/~dao29/publ/haskell14-effects.pdf> (Haskell Symposium, 2014). This version now uses Quicksort to normalise the representation.
9+ and Tomas Petricek <http://www.cl.cam.ac.uk/~dao29/publ/haskell14-effects.pdf> (Haskell Symposium, 2014). This version now uses Quicksort to normalise the representation.
11− Here is a brief example for finite maps:
11+ Here is a brief example for finite maps:
14 > import Data.Type.Map
14 > import Data.Type.Map
@@ -19,26 +19,26 @@ description:
19 > combine x y = x + y
19 > combine x y = x + y
21 > foo :: Map '["x" :-> Int, "z" :-> Bool, "w" :-> Int]
21 > foo :: Map '["x" :-> Int, "z" :-> Bool, "w" :-> Int]
22− > foo = Ext (Var :: (Var "x")) 2
22+ > foo = Ext (Var :: (Var "x")) 2
23− > $ Ext (Var :: (Var "z")) True
23+ > $ Ext (Var :: (Var "z")) True
24− > $ Ext (Var :: (Var "w")) 5
24+ > $ Ext (Var :: (Var "w")) 5
25− > $ Empty
25+ > $ Empty
27 > bar :: Map '["y" :-> Int, "w" :-> Int]
27 > bar :: Map '["y" :-> Int, "w" :-> Int]
28 > bar = Ext (Var :: (Var "y")) 3
28 > bar = Ext (Var :: (Var "y")) 3
29 > $ Ext (Var :: (Var "w")) 1
29 > $ Ext (Var :: (Var "w")) 1
32 > -- foobar :: Map '["w" :-> Int, "x" :-> Int, "y" :-> Int, "z" :-> Bool]
32 > -- foobar :: Map '["w" :-> Int, "x" :-> Int, "y" :-> Int, "z" :-> Bool]
33 > foobar = foo `union` bar
33 > foobar = foo `union` bar
35 The 'Map' type for 'foobar' here shows the normalised form (sorted with no duplicates).
35 The 'Map' type for 'foobar' here shows the normalised form (sorted with no duplicates).
36 The type signatures is commented out as it can be infered. Running the example we get:
36 The type signatures is commented out as it can be infered. Running the example we get:
38− > >>> foobar
38+ > >>> foobar
39 > {w :-> 6, x :-> 2, y :-> 3, z :-> True}
39 > {w :-> 6, x :-> 2, y :-> 3, z :-> True}
41− Thus, we see that the values for \"w\" are added together.
41+ Thus, we see that the values for \"w\" are added together.
42 For sets, here is an example:
42 For sets, here is an example:
44 > import GHC.TypeLits
44 > import GHC.TypeLits
@@ -48,7 +48,7 @@ description:
48 > data Natural (a :: Nat) where
48 > data Natural (a :: Nat) where
49 > Z :: Natural 0
49 > Z :: Natural 0
50 > S :: Natural n -> Natural (n + 1)
50 > S :: Natural n -> Natural (n + 1)
52 > -- foo :: Set '[Natural 0, Natural 1, Natural 3]
52 > -- foo :: Set '[Natural 0, Natural 1, Natural 3]
53 > foo = asSet $ Ext (S Z) (Ext (S (S (S Z))) (Ext Z Empty))
53 > foo = asSet $ Ext (S Z) (Ext (S (S (S Z))) (Ext Z Empty))
@@ -63,7 +63,7 @@ description:
63license: BSD3
63license: BSD3
64license-file: LICENSE
64license-file: LICENSE
65category: Type System, Data Structures
65category: Type System, Data Structures
66−copyright: 2013-16 University of Cambridge
66+copyright: 2013-18 University of Kent
67author: Dominic Orchard
67author: Dominic Orchard
68maintainer: Dominic Orchard
68maintainer: Dominic Orchard
69stability: experimental
69stability: experimental
@@ -84,6 +84,6 @@ library
85 exposed-modules: Data.Type.Set
85 exposed-modules: Data.Type.Set
86 Data.Type.Map
86 Data.Type.Map
88 build-depends: base < 5,
88 build-depends: base < 5,