extensible-0.4.10: Extensible, efficient, optics-friendly data types and effects

Copyright(c) Fumiaki Kinoshita 2018
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Data.Extensible.Nullable

Description

 
Synopsis

Documentation

vacancy :: Generate xs => Nullable h :* xs Source #

A product filled with Nullable Nothing

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 #

Wrapped Maybe

Constructors

Nullable 

Fields

Instances
Wrapper h => Wrapper (Nullable h :: k -> *) Source # 
Instance details

Defined in Data.Extensible.Nullable

Associated Types

type Repr (Nullable h) v :: * Source #

Methods

_Wrapper :: (Functor f, Profunctor p) => Optic' p f (Nullable h v) (Repr (Nullable h) v) Source #

Eq (h x) => Eq (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

(==) :: Nullable h x -> Nullable h x -> Bool #

(/=) :: Nullable h x -> Nullable h x -> Bool #

Ord (h x) => Ord (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

compare :: Nullable h x -> Nullable h x -> Ordering #

(<) :: Nullable h x -> Nullable h x -> Bool #

(<=) :: Nullable h x -> Nullable h x -> Bool #

(>) :: Nullable h x -> Nullable h x -> Bool #

(>=) :: Nullable h x -> Nullable h x -> Bool #

max :: Nullable h x -> Nullable h x -> Nullable h x #

min :: Nullable h x -> Nullable h x -> Nullable h x #

Show (h x) => Show (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

showsPrec :: Int -> Nullable h x -> ShowS #

show :: Nullable h x -> String #

showList :: [Nullable h x] -> ShowS #

Generic (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Associated Types

type Rep (Nullable h x) :: * -> * #

Methods

from :: Nullable h x -> Rep (Nullable h x) x0 #

to :: Rep (Nullable h x) x0 -> Nullable h x #

Semigroup (h x) => Semigroup (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

(<>) :: Nullable h x -> Nullable h x -> Nullable h x #

sconcat :: NonEmpty (Nullable h x) -> Nullable h x #

stimes :: Integral b => b -> Nullable h x -> Nullable h x #

Semigroup (h x) => Monoid (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

mempty :: Nullable h x #

mappend :: Nullable h x -> Nullable h x -> Nullable h x #

mconcat :: [Nullable h x] -> Nullable h x #

Lift (h a) => Lift (Nullable h a) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

lift :: Nullable h a -> Q Exp #

Arbitrary (h x) => Arbitrary (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

arbitrary :: Gen (Nullable h x) #

shrink :: Nullable h x -> [Nullable h x] #

Hashable (h x) => Hashable (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

hashWithSalt :: Int -> Nullable h x -> Int #

hash :: Nullable h x -> Int #

Forall (KeyValue KnownSymbol (Instance1 ToJSON h)) xs => ToJSON (Nullable (Field h :: Assoc Symbol v -> *) :* xs) # 
Instance details

Defined in Data.Extensible.Dictionary

Methods

toJSON :: (Nullable (Field h) :* xs) -> Value #

toEncoding :: (Nullable (Field h) :* xs) -> Encoding #

toJSONList :: [Nullable (Field h) :* xs] -> Value #

toEncodingList :: [Nullable (Field h) :* xs] -> Encoding #

Forall (KeyValue KnownSymbol (Instance1 FromJSON h)) xs => FromJSON (Nullable (Field h :: Assoc Symbol v -> *) :* xs) # 
Instance details

Defined in Data.Extensible.Dictionary

NFData (h x) => NFData (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

Methods

rnf :: Nullable h x -> () #

type Repr (Nullable h :: k -> *) (x :: k) Source # 
Instance details

Defined in Data.Extensible.Nullable

type Repr (Nullable h :: k -> *) (x :: k) = Maybe (Repr h x)
type Rep (Nullable h x) Source # 
Instance details

Defined in Data.Extensible.Nullable

type Rep (Nullable h x) = D1 (MetaData "Nullable" "Data.Extensible.Nullable" "extensible-0.4.10-1w9j3i1U9Si7cH6Q7IPuj8" True) (C1 (MetaCons "Nullable" PrefixI True) (S1 (MetaSel (Just "getNullable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (h x)))))

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

Apply a function to its content.