@@ -0,0 +1,61 @@
3+synopsis: Type-level sets (with value-level counterparts and various operations)
5+ This package provides type-level sets (no duplicates, sorted to provide a nomral form) via 'Set',
6+ with value-level counterparts. Described in the paper "Embedding effect systems in Haskell" by Dominic Orchard
7+ and Tomas Petricek <http://www.cl.cam.ac.uk/~dao29/publ/haskell14-effects.pdf>
9+ Here is a brief example:
12+ > import Data.Type.Set
14+ > foo :: Set '["x" :-> Int, "z" :-> Int, "w" :-> Int]
15+ > foo = Ext ((Var :: (Var "x")) :-> 2) $
16+ > Ext ((Var :: (Var "z")) :-> 4) $
17+ > Ext ((Var :: (Var "w")) :-> 5) $
20+ > bar :: Set '["y" :-> Int, "w" :-> Int]
21+ > bar = Ext ((Var :: (Var "y")) :-> 3) $
22+ > Ext ((Var :: (Var "w")) :-> 1) $
25+ > -- foobar :: Set '["w" :-> Int, "x" :-> Int, "y" :-> Int, "z" :-> Int]
26+ > foobar = foo `union` bar
28+ The 'Set' type for 'foobar' here shows the normalised form (sorted with no duplicates).
29+ The type signatures is commented out as it can be infered. Running the example we get:
32+ > [(Var :-> 1), (Var :-> 2), (Var :-> 3), (Var :-> 4)]
34+ Thus, we see that the first value paired with the \"w\" variable is dropped.
38+category: Type System, Data Structures
39+copyright: 2013-14 University of Cambridge
40+author: Dominic Orchard
41+maintainer: Dominic Orchard
42+stability: experimental
45+tested-with: GHC == 7.8.2
47+extra-source-files: example.hs
50+source-repository head
52+ location: https://github.com/dorchard/type-level-sets
58+ exposed-modules: Data.Type.Set
60+ build-depends: base < 5,