finite-polynomial
Safe HaskellNone
LanguageHaskell2010

Data.Functor.Polynomial.Finitary.Class

Synopsis

Documentation

class Functor f => FinitaryPolynomial (f :: Type -> Type) where Source #

Non-zero polynomial functor

Associated Types

type PolyRep (f :: Type -> Type) :: P Source #

Methods

sPolyRep :: Sing (PolyRep f) Source #

toPoly :: f x -> Ev (PolyRep f) x Source #

fromPoly :: Ev (PolyRep f) x -> f x Source #

Instances

Instances details
FinitaryPolynomial Identity Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep Identity 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep Identity = 'T 'U
FinitaryPolynomial Par1 Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep Par1 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep Par1 = 'T 'U
FinitaryPolynomial Maybe Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep Maybe 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

SingI p => FinitaryPolynomial (Ev p) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (Ev p) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (Ev p) = p

Methods

sPolyRep :: Sing (PolyRep (Ev p)) Source #

toPoly :: Ev p x -> Ev (PolyRep (Ev p)) x Source #

fromPoly :: Ev (PolyRep (Ev p)) x -> Ev p x Source #

FinitaryPolynomial (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (Proxy :: Type -> Type) = 'U

Methods

sPolyRep :: Sing (PolyRep (Proxy :: Type -> Type)) Source #

toPoly :: Proxy x -> Ev (PolyRep (Proxy :: Type -> Type)) x Source #

fromPoly :: Ev (PolyRep (Proxy :: Type -> Type)) x -> Proxy x Source #

FinitaryPolynomial (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (U1 :: Type -> Type) = 'U

Methods

sPolyRep :: Sing (PolyRep (U1 :: Type -> Type)) Source #

toPoly :: U1 x -> Ev (PolyRep (U1 :: Type -> Type)) x Source #

fromPoly :: Ev (PolyRep (U1 :: Type -> Type)) x -> U1 x Source #

FinitaryPolynomial f => FinitaryPolynomial (ViaPolynomial e f) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Deriving

Associated Types

type PolyRep (ViaPolynomial e f) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Deriving

(Generic1 f, FinitaryPolynomial (Rep1 f)) => FinitaryPolynomial (Generically1 f) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (Generically1 f) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

FinitaryPolynomial f => FinitaryPolynomial (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (Rec1 f) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (Rec1 f) = PolyRep f

Methods

sPolyRep :: Sing (PolyRep (Rec1 f)) Source #

toPoly :: Rec1 f x -> Ev (PolyRep (Rec1 f)) x Source #

fromPoly :: Ev (PolyRep (Rec1 f)) x -> Rec1 f x Source #

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

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (f :*: g) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (f :*: g) = PolyRep f * PolyRep g

Methods

sPolyRep :: Sing (PolyRep (f :*: g)) Source #

toPoly :: (f :*: g) x -> Ev (PolyRep (f :*: g)) x Source #

fromPoly :: Ev (PolyRep (f :*: g)) x -> (f :*: g) x Source #

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

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (f :+: g) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (f :+: g) = PolyRep f + PolyRep g

Methods

sPolyRep :: Sing (PolyRep (f :+: g)) Source #

toPoly :: (f :+: g) x -> Ev (PolyRep (f :+: g)) x Source #

fromPoly :: Ev (PolyRep (f :+: g)) x -> (f :+: g) x Source #

FinitaryPolynomial (K1 i () :: Type -> Type) Source #

Quick&dirty alternative to Finitary c => FinitaryPolynomial (K1 i c)

Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (K1 i () :: Type -> Type) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (K1 i () :: Type -> Type) = 'U

Methods

sPolyRep :: Sing (PolyRep (K1 i () :: Type -> Type)) Source #

toPoly :: K1 i () x -> Ev (PolyRep (K1 i () :: Type -> Type)) x Source #

fromPoly :: Ev (PolyRep (K1 i () :: Type -> Type)) x -> K1 i () x Source #

FinitaryPolynomial (K1 i Bool :: Type -> Type) Source #

Quick&dirty alternative to Finitary c => FinitaryPolynomial (K1 i c)

Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (K1 i Bool :: Type -> Type) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (K1 i Bool :: Type -> Type) = 'S 'U

Methods

sPolyRep :: Sing (PolyRep (K1 i Bool :: Type -> Type)) Source #

toPoly :: K1 i Bool x -> Ev (PolyRep (K1 i Bool :: Type -> Type)) x Source #

fromPoly :: Ev (PolyRep (K1 i Bool :: Type -> Type)) x -> K1 i Bool x Source #

(FinitaryPolynomial f, FinitaryPolynomial g) => FinitaryPolynomial (f :.: g) Source # 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (f :.: g) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (f :.: g) = PolyRep f << PolyRep g

Methods

sPolyRep :: Sing (PolyRep (f :.: g)) Source #

toPoly :: (f :.: g) x -> Ev (PolyRep (f :.: g)) x Source #

fromPoly :: Ev (PolyRep (f :.: g)) x -> (f :.: g) x Source #

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

Defined in Data.Functor.Polynomial.Finitary.Class

Associated Types

type PolyRep (M1 i m f) 
Instance details

Defined in Data.Functor.Polynomial.Finitary.Class

type PolyRep (M1 i m f) = PolyRep f

Methods

sPolyRep :: Sing (PolyRep (M1 i m f)) Source #

toPoly :: M1 i m f x -> Ev (PolyRep (M1 i m f)) x Source #

fromPoly :: Ev (PolyRep (M1 i m f)) x -> M1 i m f x Source #