Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Position x xs
- class x ∈ xs where
- data h :* s where
- (<:*) :: h x -> (h :* xs) -> h :* (x : xs)
- unconsP :: (h :* (x : xs)) -> (h x, h :* xs)
- outP :: forall h x xs. x ∈ xs => (h :* xs) -> h x
- record :: forall h x xs f. (Functor f, x ∈ xs) => (h x -> f (h x)) -> (h :* xs) -> f (h :* xs)
- recordAt :: forall h x xs f. Functor f => Position x xs -> (h x -> f (h x)) -> (h :* xs) -> f (h :* xs)
- data h :| s where
- (<:|) :: (h x -> r) -> ((h :| xs) -> r) -> (h :| (x : xs)) -> r
- exhaust :: (h :| []) -> r
- inS :: x ∈ xs => h x -> h :| xs
- newtype K0 a = K0 {
- getK0 :: a
- platter :: (x ∈ xs, Functor f) => (x -> f x) -> (K0 :* xs) -> f (K0 :* xs)
- (<%) :: x -> (K0 :* xs) -> K0 :* (x : xs)
- newtype K1 a f = K1 {
- getK1 :: f a
- newtype Union fs a = Union {}
- liftU :: f ∈ fs => f a -> Union fs a
- newtype Match h a x = Match {
- runMatch :: h x -> a
- match :: (Match h a :* xs) -> (h :| xs) -> a
- (<?%) :: (x -> a) -> (Match K0 a :* xs) -> Match K0 a :* (x : xs)
- (<?!) :: (f x -> a) -> (Match (K1 x) a :* xs) -> Match (K1 x) a :* (f : fs)
Lookup
Product
The extensible product type
record :: forall h x xs f. (Functor f, x ∈ xs) => (h x -> f (h x)) -> (h :* xs) -> f (h :* xs) Source
O(log n) A lens for a specific element.
recordAt :: forall h x xs f. Functor f => Position x xs -> (h x -> f (h x)) -> (h :* xs) -> f (h :* xs) Source
Sum
The extensible sum type
Utilities
platter :: (x ∈ xs, Functor f) => (x -> f x) -> (K0 :* xs) -> f (K0 :* xs) Source
O(log n) A lens for a plain value in a product.