| Copyright | (c) Fumiaki Kinoshita 2015 |
|---|---|
| License | BSD3 |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Extensible.Nullable
Description
- 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.
Poly-kinded Maybe
Constructors
| Nullable | |
Fields
| |
mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y Source
Apply a function to its content.