Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TypeRepVector f = TypeRepVect {}
- data TF f where
- empty :: TypeRepVector f
- insert :: forall a f. Typeable a => a -> TypeRepVector f -> TypeRepVector f
- lookup :: forall a f. Typeable a => TypeRepVector f -> Maybe (f a)
- size :: TypeRepVector f -> Int
- fromList :: forall f. [TF f] -> TypeRepVector f
Documentation
data TypeRepVector f Source #
empty :: TypeRepVector f Source #
Empty structure.
insert :: forall a f. Typeable a => a -> TypeRepVector f -> TypeRepVector f Source #
Inserts the value with its type as a key.
lookup :: forall a f. Typeable a => TypeRepVector f -> Maybe (f a) Source #
Looks up the value at the type. >>> let x = lookup $ insert (11 :: Int) empty >>> x :: Maybe Int Just 11 >>> x :: Maybe () Nothing
size :: TypeRepVector f -> Int Source #
Returns the size of the TypeRepVect
.
fromList :: forall f. [TF f] -> TypeRepVector f Source #