unwrapped-functors-0.1.0.0: Unwrapping sums/products lifted to functors

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Unwrapped

Documentation

class Functor f => Unwrappable f where Source #

Minimal complete definition

unwrap, wrap

Associated Types

type Unwrapped f x Source #

Methods

unwrap :: f x -> Unwrapped f x Source #

wrap :: Unwrapped f x -> f x Source #

Instances
Unwrappable Identity Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped Identity x :: * Source #

Unwrappable (Proxy :: * -> *) Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped Proxy x :: * Source #

Unwrappable (Const a :: * -> *) Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped (Const a) x :: * Source #

Methods

unwrap :: Const a x -> Unwrapped (Const a) x Source #

wrap :: Unwrapped (Const a) x -> Const a x Source #

(Unwrappable f, Unwrappable g) => Unwrappable (Product f g) Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped (Product f g) x :: * Source #

Methods

unwrap :: Product f g x -> Unwrapped (Product f g) x Source #

wrap :: Unwrapped (Product f g) x -> Product f g x Source #

(Unwrappable f, Unwrappable g) => Unwrappable (Sum f g) Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped (Sum f g) x :: * Source #

Methods

unwrap :: Sum f g x -> Unwrapped (Sum f g) x Source #

wrap :: Unwrapped (Sum f g) x -> Sum f g x Source #

(Unwrappable f, Unwrappable g) => Unwrappable (Compose f g) Source # 
Instance details

Defined in Data.Functor.Unwrapped

Associated Types

type Unwrapped (Compose f g) x :: * Source #

Methods

unwrap :: Compose f g x -> Unwrapped (Compose f g) x Source #

wrap :: Unwrapped (Compose f g) x -> Compose f g x Source #