Safe Haskell | Safe |
---|---|

Language | Haskell98 |

- data T a
- flatten :: Ord a => T a -> [[a]]
- symbols :: Ord a => T a -> Set a
- size :: T a -> Integer
- select :: T a -> Integer -> [a]
- representationSize :: T a -> Int
- union :: Ord a => T a -> T a -> T a
- intersection :: Ord a => T a -> T a -> T a
- normalizeProducts :: [(Set a, T a)] -> [(Set a, T a)]
- newtype Indexable a = Indexable (T a)
- compress :: Ord a => T a -> T a
- member :: Ord a => [a] -> T a -> Bool
- null :: T a -> Bool

# Documentation

`Products [(a,b),(c,d)]`

expresses a x b union c x d,
where `x`

denotes the set product.

representationSize :: T a -> Int Source #

union :: Ord a => T a -> T a -> T a Source #

We could try to merge set products. I'll first want to see, whether this is needed in a relevant number of cases.

This allows (T a) to be a key in a Map. I do not want an Ord (T a) instance, since it makes no sense and it requires an Eq (T a) instance that is either expensive (if it means set equality) or confusing (if it means structural equality).