wrapped-generic-default-0.1.0.1: Provides an orphan instance Default (Wrapped Generic a)
Safe HaskellNone
LanguageHaskell2010

Data.Wrapped.Default

Description

Provides instance Default (Wrapped Generic a) for use with DerivingVia.

Synopsis

Documentation

class GDefault f where Source #

Generic instances for Default.

Exported just to give Haddock something to link to; use Wrapped Generic with -XDerivingVia instead.

Methods

gdef :: f x Source #

Instances

Instances details
GDefault (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Wrapped.Default

Methods

gdef :: U1 x Source #

Default a => GDefault (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Data.Wrapped.Default

Methods

gdef :: K1 i a x Source #

GDefault f => GDefault (f :+: g) Source # 
Instance details

Defined in Data.Wrapped.Default

Methods

gdef :: (f :+: g) x Source #

(GDefault f, GDefault g) => GDefault (f :*: g) Source # 
Instance details

Defined in Data.Wrapped.Default

Methods

gdef :: (f :*: g) x Source #

GDefault f => GDefault (M1 i m f) Source # 
Instance details

Defined in Data.Wrapped.Default

Methods

gdef :: M1 i m f x Source #

Orphan instances

(Generic a, GDefault (Rep a)) => Default (Wrapped Generic a) Source #

The first constructor with all fields set to def.

Given the data type definition:

    data Foo = Foo Int Bool | Bar Double
      deriving Generic
      deriving Default via Wrapped Generic Foo

then

def = Foo def def :: Foo, i.e. def picks the first constructor and fills it with def calls.

Instance details

Methods

def :: Wrapped Generic a #