Safe Haskell | Safe-Inferred |
---|
Utilities for working with TypeSum
s.
- empty :: Kind n -> TypeSum n
- singleton :: Ord n => Kind n -> Type n -> TypeSum n
- union :: Ord n => TypeSum n -> TypeSum n -> TypeSum n
- unions :: Ord n => Kind n -> [TypeSum n] -> TypeSum n
- insert :: Ord n => Type n -> TypeSum n -> TypeSum n
- toList :: TypeSum n -> [Type n]
- fromList :: Ord n => Kind n -> [Type n] -> TypeSum n
- kindOfSum :: TypeSum n -> Kind n
- elem :: (Eq n, Ord n) => Type n -> TypeSum n -> Bool
- delete :: Ord n => Type n -> TypeSum n -> TypeSum n
- difference :: Ord n => TypeSum n -> TypeSum n -> TypeSum n
- hashTyCon :: TyCon n -> Maybe TyConHash
- hashTyConRange :: (TyConHash, TyConHash)
- unhashTyCon :: TyConHash -> TyCon n
Constructors
singleton :: Ord n => Kind n -> Type n -> TypeSum nSource
Construct a type sum containing a single element.
Conversion
Projection
elem :: (Eq n, Ord n) => Type n -> TypeSum n -> BoolSource
Check whether an element is a member of a sum.
- Returns True when the first argument is $0 or !0.
- Returns False when the first argument is another sum.
- May return False if the first argument is miskinded but still alpha-equivalent to some component of the sum.
Deletion
difference :: Ord n => TypeSum n -> TypeSum n -> TypeSum nSource
Delete all members of the second sum from the first one.
Hashing
hashTyConRange :: (TyConHash, TyConHash)Source
The range of hashes that can be produced by hashTyCon
.