Data.Label
Description
Assignment of unique IDs to values. Inspired by the intern package.
intern
data Label a Source #
A value of type a which has been given a unique ID.
a
Defined in Data.Label
Methods
showsPrec :: Int -> Label a -> ShowS #
show :: Label a -> String #
showList :: [Label a] -> ShowS #
(==) :: Label a -> Label a -> Bool #
(/=) :: Label a -> Label a -> Bool #
compare :: Label a -> Label a -> Ordering #
(<) :: Label a -> Label a -> Bool #
(<=) :: Label a -> Label a -> Bool #
(>) :: Label a -> Label a -> Bool #
(>=) :: Label a -> Label a -> Bool #
max :: Label a -> Label a -> Label a #
min :: Label a -> Label a -> Label a #
unsafeMkLabel :: Int32 -> Label a Source #
Construct a Label a from its unique ID, which must be the labelNum of an already existing Label. Extremely unsafe!
Label a
Label
labelNum
labelNum :: Label a -> Int32 Source #
The unique ID of a label.
label :: forall a. (Typeable a, Ord a) => a -> Label a Source #
Assign a label to a value.
find :: Label a -> a Source #
Recover the underlying value from a label.