extensible-0.3.7: Extensible, efficient, optics-friendly data types

Copyright(c) Fumiaki Kinoshita 2015
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Extensible.Nullable

Description

 

Synopsis

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.

newtype Nullable h x Source

Poly-kinded Maybe

Constructors

Nullable 

Fields

getNullable :: Maybe (h x)
 

Instances

Wrapper k h => Wrapper k (Nullable k h) Source 
Eq (h x) => Eq (Nullable k h x) Source 
Ord (h x) => Ord (Nullable k h x) Source 
Show (h x) => Show (Nullable k h x) Source 
type Repr k (Nullable k h) x = Maybe (Repr k h x) Source 

mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y Source

Apply a function to its content.