Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- vacancy :: Generate xs => Nullable h :* xs
- coinclusion :: (Include ys xs, Generate ys) => Nullable (Membership xs) :* ys
- wrench :: (Generate ys, xs ⊆ ys) => (h :* xs) -> Nullable h :* ys
- retrench :: (Generate ys, xs ⊆ ys) => (h :| ys) -> Nullable ((:|) h) xs
- newtype Nullable h x = Nullable {
- getNullable :: Maybe (h x)
- mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y
Documentation
coinclusion :: (Include ys xs, Generate ys) => Nullable (Membership xs) :* ys Source #
The inverse of inclusion
.
wrench :: (Generate ys, xs ⊆ ys) => (h :* xs) -> Nullable h :* ys Source #
Extend a product and fill missing fields by Null
.
retrench :: (Generate ys, xs ⊆ ys) => (h :| ys) -> Nullable ((:|) h) xs Source #
Narrow the range of the sum, if possible.
Wrapped Maybe
Nullable | |
|
Instances
Wrapper h => Wrapper (Nullable h :: k -> *) Source # | |
Eq (h x) => Eq (Nullable h x) Source # | |
Ord (h x) => Ord (Nullable h x) Source # | |
Defined in Data.Extensible.Nullable | |
Show (h x) => Show (Nullable h x) Source # | |
Generic (Nullable h x) Source # | |
Semigroup (h x) => Semigroup (Nullable h x) Source # | |
Semigroup (h x) => Monoid (Nullable h x) Source # | |
Lift (h a) => Lift (Nullable h a) Source # | |
Arbitrary (h x) => Arbitrary (Nullable h x) Source # | |
Hashable (h x) => Hashable (Nullable h x) Source # | |
Defined in Data.Extensible.Nullable | |
Forall (KeyValue KnownSymbol (Instance1 ToJSON h)) xs => ToJSON (Nullable (Field h :: Assoc Symbol v -> *) :* xs) # | |
Forall (KeyValue KnownSymbol (Instance1 FromJSON h)) xs => FromJSON (Nullable (Field h :: Assoc Symbol v -> *) :* xs) # | |
NFData (h x) => NFData (Nullable h x) Source # | |
Defined in Data.Extensible.Nullable | |
type Repr (Nullable h :: k -> *) (x :: k) Source # | |
type Rep (Nullable h x) Source # | |
Defined in Data.Extensible.Nullable |
mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y Source #
Apply a function to its content.