type-set-0.1.0.0: Type set
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Type.Set

Synopsis

Set

data Set a Source #

Constructors

Nil 

Numbered

class Numbered a Source #

Function

type Singleton t = t :~ 'Nil Source #

type family Insert (t :: Type) (ts :: Set Type) :: Set Type where ... Source #

Equations

Insert t 'Nil = t :~ 'Nil 
Insert t (t :~ ts) = t :~ ts 
Insert t (t' :~ ts) = BOOL (InsertElse t t' ts) (InsertThen t t' ts) $ (Number t <=? Number t') 

type family Merge (ts :: Set Type) (ts' :: Set Type) :: Set Type where ... Source #

Equations

Merge ts 'Nil = ts 
Merge 'Nil ts' = ts' 
Merge (t :~ ts) (t :~ ts') = t :~ Merge ts ts' 
Merge (t :~ ts) (t' :~ ts') = BOOL (MergeElse t ts t' ts') (MergeThen t ts t' ts') $ (Number t <=? Number t') 

Operator

type (:-) t ts = t `Insert` ts infixr 5 Source #

type (:+:) ts ts' = ts `Merge` ts' infixr 5 Source #