Safe Haskell | None |
---|---|
Language | Haskell2010 |
Re-exports of useful Data.Vinyl Rec
types
- data ElField field where
- type FieldRec hs = Rec ElField hs
- newtype Identity a :: * -> * = Identity {
- runIdentity :: a
- type HList = Rec Identity
- (=:) :: Sing a -> v -> FieldRec `[`(a, v)`]`
- data Rec a b :: (u -> *) -> [u] -> * where
- (<+>) :: Rec k f as -> Rec k f bs -> Rec k f ((++) k as bs)
- (++) :: [a] -> [a] -> [a]
- type family as ++ bs :: [k]
Specialized records
FieldRec
data ElField field where Source
A more kind polymorphic element field than what's normally available in Data.Vinyl
type FieldRec hs = Rec ElField hs Source
A FieldRec
is a record of types tagged by some kind of "name".
HList
newtype Identity a :: * -> *
Identity functor and monad. (a non-strict monad)
Since: 4.8.0.0
Identity | |
|
Monad Identity | |
Functor Identity | |
MonadFix Identity | |
Applicative Identity | |
Foldable Identity | |
Traversable Identity | |
Generic1 Identity | |
MonadZip Identity | |
Eq1 Identity | |
Ord1 Identity | |
Read1 Identity | |
Show1 Identity | |
Eq a => Eq (Identity a) | |
Data a => Data (Identity a) | |
Ord a => Ord (Identity a) | |
Read a => Read (Identity a) | This instance would be equivalent to the derived instances of the
|
Show a => Show (Identity a) | This instance would be equivalent to the derived instances of the
|
Generic (Identity a) | |
Semigroup a => Semigroup (Identity a) | |
type Rep1 Identity = D1 D1Identity (C1 C1_0Identity (S1 S1_0_0Identity Par1)) | |
type Rep (Identity a) = D1 D1Identity (C1 C1_0Identity (S1 S1_0_0Identity (Rec0 a))) |
data Rec a b :: (u -> *) -> [u] -> * where
A record is parameterized by a universe u
, an interpretation f
and a
list of rows rs
. The labels or indices of the record are given by
inhabitants of the kind u
; the type of values at any label r :: u
is
given by its interpretation f r :: *
.
Eq (Rec k f ([] k)) | |
(Eq (f r), Eq (Rec k f rs)) => Eq (Rec k f ((:) k r rs)) | |
Ord (Rec k f ([] k)) | |
(Ord (f r), Ord (Rec k f rs)) => Ord (Rec k f ((:) k r rs)) | |
RecAll k f rs Show => Show (Rec k f rs) | Records may be shown insofar as their points may be shown.
|
Storable (Rec k f ([] k)) | |
(Storable (f r), Storable (Rec k f rs)) => Storable (Rec k f ((:) k r rs)) | |
Monoid (Rec k f ([] k)) | |
(Monoid (f r), Monoid (Rec k f rs)) => Monoid (Rec k f ((:) k r rs)) |
(++) :: [a] -> [a] -> [a] infixr 5
Append two lists, i.e.,
[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
If the first list is not finite, the result is the first list.