extensible-0.3.5: Extensible, efficient, lens-friendly data types

Copyright(c) Fumiaki Kinoshita 2015
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
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) 
Typeable ((k -> *) -> k -> *) (Nullable k) 
Eq (h x) => Eq (Nullable k h x) 
Ord (h x) => Ord (Nullable k h x) 
Show (h x) => Show (Nullable k h x) 
type Repr k (Nullable k h) x = Maybe (Repr k h x) 

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

Apply a function to its content.