License | BSD |
---|---|
Maintainer | sweirich@cis.upenn.edu |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Auxiliary operations to aid in the definition of type-indexed functions
- eqR :: R a -> R b -> Bool
- cast :: forall a b. (Rep a, Rep b) => a -> Maybe b
- castR :: R a -> R b -> a -> Maybe b
- gcast :: forall a b c. (Rep a, Rep b) => c a -> Maybe (c b)
- gcastR :: forall a b c. R a -> R b -> c a -> Maybe (c b)
- compareR :: R a -> R b -> Ordering
- findCon :: [Con ctx a] -> a -> Val ctx a
- data Val ctx a where
- foldl_l :: (forall a. Rep a => ctx a -> b -> a -> b) -> b -> MTup ctx l -> l -> b
- foldr_l :: (forall a. Rep a => ctx a -> a -> b -> b) -> b -> MTup ctx l -> l -> b
- map_l :: (forall a. Rep a => ctx a -> a -> a) -> MTup ctx l -> l -> l
- mapQ_l :: (forall a. Rep a => ctx a -> a -> r) -> MTup ctx l -> l -> [r]
- mapM_l :: Monad m => (forall a. Rep a => ctx a -> a -> m a) -> MTup ctx l -> l -> m l
- fromTup :: (forall a. Rep a => ctx a -> a) -> MTup ctx l -> l
- fromTupM :: Monad m => (forall a. Rep a => ctx a -> m a) -> MTup ctx l -> m l
- toList :: (forall a. Rep a => ctx a -> b) -> MTup ctx l -> [b]
- type Traversal = forall a. Rep a => a -> a
- type Query r = forall a. Rep a => a -> r
- type MapM m = forall a. Rep a => a -> m a
- gmapT :: forall a. Rep a => Traversal -> a -> a
- gmapQ :: forall a r. Rep a => Query r -> a -> [r]
- gmapM :: forall a m. (Rep a, Monad m) => MapM m -> a -> m a
- type Traversal1 ctx = forall a. Rep a => ctx a -> a -> a
- type Query1 ctx r = forall a. Rep a => ctx a -> a -> r
- type MapM1 ctx m = forall a. Rep a => ctx a -> a -> m a
- gmapT1 :: forall a ctx. Rep1 ctx a => Traversal1 ctx -> a -> a
- gmapQ1 :: forall a ctx r. Rep1 ctx a => Query1 ctx r -> a -> [r]
- gmapM1 :: forall a ctx m. (Rep1 ctx a, Monad m) => MapM1 ctx m -> a -> m a
- data Typed a = a ::: (R a)
- data Spine a where
- toSpine :: Rep a => a -> Spine a
- fromSpine :: Spine a -> a
Casting operations
cast :: forall a b. (Rep a, Rep b) => a -> Maybe b Source #
The type-safe cast operation, implicit arguments
gcast :: forall a b c. (Rep a, Rep b) => c a -> Maybe (c b) Source #
Leibniz equality between types, implicit representations
gcastR :: forall a b c. R a -> R b -> c a -> Maybe (c b) Source #
Leibniz equality between types, explicit representations
Comparison
Operations for heterogeneous lists
findCon :: [Con ctx a] -> a -> Val ctx a Source #
Given a list of constructor representations for a datatype, determine which constructor formed the datatype.
A datastructure to store the results of findCon
foldl_l :: (forall a. Rep a => ctx a -> b -> a -> b) -> b -> MTup ctx l -> l -> b Source #
A fold left for heterogeneous lists
foldr_l :: (forall a. Rep a => ctx a -> a -> b -> b) -> b -> MTup ctx l -> l -> b Source #
A fold right operation for heterogeneous lists, that folds a function expecting a type type representation across each element of the list.
map_l :: (forall a. Rep a => ctx a -> a -> a) -> MTup ctx l -> l -> l Source #
A map for heterogeneous lists
mapQ_l :: (forall a. Rep a => ctx a -> a -> r) -> MTup ctx l -> l -> [r] Source #
Transform a heterogeneous list in to a standard list
mapM_l :: Monad m => (forall a. Rep a => ctx a -> a -> m a) -> MTup ctx l -> l -> m l Source #
mapM for heterogeneous lists
fromTup :: (forall a. Rep a => ctx a -> a) -> MTup ctx l -> l Source #
Generate a heterogeneous list from metadata
fromTupM :: Monad m => (forall a. Rep a => ctx a -> m a) -> MTup ctx l -> m l Source #
Generate a heterogeneous list from metadata, in a monad
toList :: (forall a. Rep a => ctx a -> b) -> MTup ctx l -> [b] Source #
Generate a normal lists from metadata
SYB style operations (Rep)
gmapT :: forall a. Rep a => Traversal -> a -> a Source #
Map a traversal across the kids of a data structure
SYB style operations (Rep1)
type Traversal1 ctx = forall a. Rep a => ctx a -> a -> a Source #
gmapT1 :: forall a ctx. Rep1 ctx a => Traversal1 ctx -> a -> a Source #