| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Wakame.Row
Documentation
Keyed value type and function
newtype V (p :: FIELD) Source #
>>>V 3 :: V '("x", Int)(x: 3)
Instances
| (IsString s, KnownSymbol key) => Keys' s (S1 (MetaSel (Nothing :: Maybe Symbol) su ss ds) (Rec0 (V ((,) key a))) :: k -> Type) Source # | |
| IsRow' (S1 (MetaSel (Nothing :: Maybe Symbol) su ss ds) (Rec0 (V ((,) key a))) :: k -> Type) Source # | |
Defined in Wakame.Generics | |
| (KnownSymbol (Fst p), Eq (Snd p)) => Eq (V p) Source # | |
| (KnownSymbol (Fst p), Show (Snd p)) => Show (V p) Source # | |
| Generic (V ((,) k v)) Source # | |
| type Of' (S1 (MetaSel (Nothing :: Maybe Symbol) su ss ds) (Rec0 (V ((,) key a))) :: k -> Type) Source # | |
| type Rep (V ((,) k v)) Source # | |
Defined in Wakame.Row type Rep (V ((,) k v)) = S1 (MetaSel (Just k) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 v) | |
keyed :: KnownSymbol k => v -> Keyed k v Source #
Row type
class IsRow (a :: Type) where Source #
Typeclass of converting from/to Row
Instances
| (Generic a, IsRow' (Rep a)) => IsRow a Source # | Instance of
|
Re-export from Data.SOP.NP
data NP (a :: k -> Type) (b :: [k]) :: forall k. (k -> Type) -> [k] -> Type where #
An n-ary product.
The product is parameterized by a type constructor f and
indexed by a type-level list xs. The length of the list
determines the number of elements in the product, and if the
i-th element of the list is of type x, then the i-th
element of the product is of type f x.
The constructor names are chosen to resemble the names of the list constructors.
Two common instantiations of f are the identity functor I
and the constant functor K. For I, the product becomes a
heterogeneous list, where the type-level list describes the
types of its components. For , the product becomes a
homogeneous list, where the contents of the type-level list are
ignored, but its length still specifies the number of elements.K a
In the context of the SOP approach to generic programming, an n-ary product describes the structure of the arguments of a single data constructor.
Examples:
I 'x' :* I True :* Nil :: NP I '[ Char, Bool ] K 0 :* K 1 :* Nil :: NP (K Int) '[ Char, Bool ] Just 'x' :* Nothing :* Nil :: NP Maybe '[ Char, Bool ]
Constructors
| Nil :: forall k (a :: k -> Type) (b :: [k]). NP a ([] :: [k]) | |
| (:*) :: forall k (a :: k -> Type) (b :: [k]) (x :: k) (xs :: [k]). a x -> NP a xs -> NP a (x ': xs) infixr 5 |
Instances
| HTrans (NP :: (k1 -> Type) -> [k1] -> Type) (NP :: (k2 -> Type) -> [k2] -> Type) | |
| HPure (NP :: (k -> Type) -> [k] -> Type) | |
| HAp (NP :: (k -> Type) -> [k] -> Type) | |
| HCollapse (NP :: (k -> Type) -> [k] -> Type) | |
Defined in Data.SOP.NP | |
| HTraverse_ (NP :: (k -> Type) -> [k] -> Type) | |
Defined in Data.SOP.NP Methods hctraverse_ :: (AllN NP c xs, Applicative g) => proxy c -> (forall (a :: k0). c a => f a -> g ()) -> NP f xs -> g () # htraverse_ :: (SListIN NP xs, Applicative g) => (forall (a :: k0). f a -> g ()) -> NP f xs -> g () # | |
| HSequence (NP :: (k -> Type) -> [k] -> Type) | |
Defined in Data.SOP.NP Methods hsequence' :: (SListIN NP xs, Applicative f) => NP (f :.: g) xs -> f (NP g xs) # hctraverse' :: (AllN NP c xs, Applicative g) => proxy c -> (forall (a :: k0). c a => f a -> g (f' a)) -> NP f xs -> g (NP f' xs) # htraverse' :: (SListIN NP xs, Applicative g) => (forall (a :: k0). f a -> g (f' a)) -> NP f xs -> g (NP f' xs) # | |
| All (Compose Eq f) xs => Eq (NP f xs) | |
| (All (Compose Eq f) xs, All (Compose Ord f) xs) => Ord (NP f xs) | |
| All (Compose Show f) xs => Show (NP f xs) | |
| All (Compose Semigroup f) xs => Semigroup (NP f xs) | Since: sop-core-0.4.0.0 |
| (All (Compose Monoid f) xs, All (Compose Semigroup f) xs) => Monoid (NP f xs) | Since: sop-core-0.4.0.0 |
| All (Compose NFData f) xs => NFData (NP f xs) | Since: sop-core-0.2.5.0 |
Defined in Data.SOP.NP | |
| type Same (NP :: (k1 -> Type) -> [k1] -> Type) | |
| type Prod (NP :: (k -> Type) -> [k] -> Type) | |
| type CollapseTo (NP :: (k -> Type) -> [k] -> Type) a | |
Defined in Data.SOP.NP | |
| type SListIN (NP :: (k -> Type) -> [k] -> Type) | |
Defined in Data.SOP.NP | |
| type AllN (NP :: (k -> Type) -> [k] -> Type) (c :: k -> Constraint) | |
Defined in Data.SOP.NP | |
| type AllZipN (NP :: (k -> Type) -> [k] -> Type) (c :: a -> b -> Constraint) | |
Defined in Data.SOP.NP | |