Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- vacancy :: Generate xs => xs :& Nullable h
- coinclusion :: (Include ys xs, Generate ys) => ys :& Nullable (Membership xs)
- wrench :: (Generate ys, xs ⊆ ys) => (xs :& h) -> ys :& Nullable h
- retrench :: (Generate ys, xs ⊆ ys) => (ys :/ h) -> Nullable ((:/) xs) h
- newtype Nullable h x = Nullable {
- getNullable :: Maybe (h x)
- mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y
- fromNullable :: h x -> Nullable h x -> h x
- coinclusionAssoc :: (IncludeAssoc ys xs, Generate ys) => ys :& Nullable (Membership xs)
- wrenchAssoc :: (Generate ys, IncludeAssoc ys xs) => (xs :& h) -> ys :& Nullable h
- retrenchAssoc :: (Generate ys, IncludeAssoc ys xs) => (ys :/ h) -> Nullable ((:/) xs) h
Documentation
coinclusion :: (Include ys xs, Generate ys) => ys :& Nullable (Membership xs) Source #
The inverse of inclusion
.
wrench :: (Generate ys, xs ⊆ ys) => (xs :& h) -> ys :& Nullable h Source #
Extend a product and fill missing fields by Null
.
retrench :: (Generate ys, xs ⊆ ys) => (ys :/ h) -> Nullable ((:/) xs) h Source #
Narrow the range of the sum, if possible.
Wrapped Maybe
Nullable | |
|
Instances
mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y Source #
Apply a function to its content.
coinclusionAssoc :: (IncludeAssoc ys xs, Generate ys) => ys :& Nullable (Membership xs) Source #
The inverse of inclusionAssoc
.
wrenchAssoc :: (Generate ys, IncludeAssoc ys xs) => (xs :& h) -> ys :& Nullable h Source #
Extend a product and fill missing fields by Null
.
retrenchAssoc :: (Generate ys, IncludeAssoc ys xs) => (ys :/ h) -> Nullable ((:/) xs) h Source #
Narrow the range of the sum, if possible.