@@ -0,0 +1,61 @@
1+name: type-level-sets
2+version: 0.5
3+synopsis: Type-level sets (with value-level counterparts and various operations)
4+description:
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>
8+ .
9+ Here is a brief example:
10+ .
11+ >
12+ > import Data.Type.Set
13+ >
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) $
18+ > Empty
19+ >
20+ > bar :: Set '["y" :-> Int, "w" :-> Int]
21+ > bar = Ext ((Var :: (Var "y")) :-> 3) $
22+ > Ext ((Var :: (Var "w")) :-> 1) $
23+ > Empty
24+ >
25+ > -- foobar :: Set '["w" :-> Int, "x" :-> Int, "y" :-> Int, "z" :-> Int]
26+ > foobar = foo `union` bar
27+ .
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:
30+ .
31+ > >>> foobar
32+ > [(Var :-> 1), (Var :-> 2), (Var :-> 3), (Var :-> 4)]
33+ .
34+ Thus, we see that the first value paired with the \"w\" variable is dropped.
35+ .
36+license: BSD3
37+license-file: LICENSE
38+category: Type System, Data Structures
39+copyright: 2013-14 University of Cambridge
40+author: Dominic Orchard
41+maintainer: Dominic Orchard
42+stability: experimental
43+build-type: Simple
44+cabal-version: >= 1.6
45+tested-with: GHC == 7.8.2
46+
47+extra-source-files: example.hs
48+
49+
50+source-repository head
51+ type: git
52+ location: https://github.com/dorchard/type-level-sets
53+
54+library
55+ hs-source-dirs: src
56+
57+
58+ exposed-modules: Data.Type.Set
59+
60+ build-depends: base < 5,
61+ ghc-prim