generics-sop-0.3.2.0: Generic Programming using True Sums of Products

Safe HaskellNone
LanguageHaskell2010

Generics.SOP.Universe

Description

Codes and interpretations

Synopsis

Documentation

type Rep a = SOP I (Code a) #

The (generic) representation of a datatype.

A datatype is isomorphic to the sum-of-products of its code. The isomorphism is witnessed by from and to from the Generic class.

class All SListI (Code a) => Generic (a :: *) where #

The class of representable datatypes.

The SOP approach to generic programming is based on viewing datatypes as a representation (Rep) built from the sum of products of its components. The components of are datatype are specified using the Code type family.

The isomorphism between the original Haskell datatype and its representation is witnessed by the methods of this class, from and to. So for instances of this class, the following laws should (in general) hold:

to . from === id :: a -> a
from . to === id :: Rep a -> Rep a

You typically don't define instances of this class by hand, but rather derive the class instance automatically.

Option 1: Derive via the built-in GHC-generics. For this, you need to use the DeriveGeneric extension to first derive an instance of the Generic class from module GHC.Generics. With this, you can then give an empty instance for Generic, and the default definitions will just work. The pattern looks as follows:

import qualified GHC.Generics as GHC
import Generics.SOP

...

data T = ... deriving (GHC.Generic, ...)

instance Generic T -- empty
instance HasDatatypeInfo T -- empty, if you want/need metadata

Option 2: Derive via Template Haskell. For this, you need to enable the TemplateHaskell extension. You can then use deriveGeneric from module Generics.SOP.TH to have the instance generated for you. The pattern looks as follows:

import Generics.SOP
import Generics.SOP.TH

...

data T = ...

deriveGeneric ''T -- derives HasDatatypeInfo as well

Tradeoffs: Whether to use Option 1 or 2 is mainly a matter of personal taste. The version based on Template Haskell probably has less run-time overhead.

Non-standard instances: It is possible to give Generic instances manually that deviate from the standard scheme, as long as at least

to . from === id :: a -> a

still holds.

Associated Types

type Code a :: [[*]] #

The code of a datatype.

This is a list of lists of its components. The outer list contains one element per constructor. The inner list contains one element per constructor argument (field).

Example: The datatype

data Tree = Leaf Int | Node Tree Tree

is supposed to have the following code:

type instance Code (Tree a) =
  '[ '[ Int ]
   , '[ Tree, Tree ]
   ]

Methods

from :: a -> Rep a #

Converts from a value to its structural representation.

from :: (GFrom a, Generic a, Rep a ~ SOP I (GCode a)) => a -> Rep a #

Converts from a value to its structural representation.

to :: Rep a -> a #

Converts from a structural representation back to the original value.

to :: (GTo a, Generic a, Rep a ~ SOP I (GCode a)) => Rep a -> a #

Converts from a structural representation back to the original value.

Instances
Generic Bool # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Bool :: [[*]] #

Methods

from :: Bool -> Rep Bool #

to :: Rep Bool -> Bool #

Generic Ordering # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Ordering :: [[*]] #

Generic () # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code () :: [[*]] #

Methods

from :: () -> Rep () #

to :: Rep () -> () #

Generic DataRep # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code DataRep :: [[*]] #

Generic ConstrRep # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ConstrRep :: [[*]] #

Generic Fixity # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Fixity :: [[*]] #

Methods

from :: Fixity -> Rep Fixity #

to :: Rep Fixity -> Fixity #

Generic FormatAdjustment # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code FormatAdjustment :: [[*]] #

Generic FormatSign # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code FormatSign :: [[*]] #

Generic FieldFormat # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code FieldFormat :: [[*]] #

Generic FormatParse # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code FormatParse :: [[*]] #

Generic Version # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Version :: [[*]] #

Generic PatternMatchFail # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code PatternMatchFail :: [[*]] #

Generic RecSelError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code RecSelError :: [[*]] #

Generic RecConError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code RecConError :: [[*]] #

Generic RecUpdError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code RecUpdError :: [[*]] #

Generic NoMethodError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code NoMethodError :: [[*]] #

Generic NonTermination # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code NonTermination :: [[*]] #

Generic NestedAtomically # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code NestedAtomically :: [[*]] #

Generic Errno # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Errno :: [[*]] #

Methods

from :: Errno -> Rep Errno #

to :: Rep Errno -> Errno #

Generic BlockedIndefinitelyOnMVar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code BlockedIndefinitelyOnMVar :: [[*]] #

Generic BlockedIndefinitelyOnSTM # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code BlockedIndefinitelyOnSTM :: [[*]] #

Generic Deadlock # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Deadlock :: [[*]] #

Generic AssertionFailed # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code AssertionFailed :: [[*]] #

Generic AsyncException # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code AsyncException :: [[*]] #

Generic ArrayException # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ArrayException :: [[*]] #

Generic ExitCode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ExitCode :: [[*]] #

Generic BufferMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code BufferMode :: [[*]] #

Generic Newline # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Newline :: [[*]] #

Generic NewlineMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code NewlineMode :: [[*]] #

Generic SeekMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code SeekMode :: [[*]] #

Generic MaskingState # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code MaskingState :: [[*]] #

Generic IOException # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code IOException :: [[*]] #

Generic ErrorCall # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ErrorCall :: [[*]] #

Generic ArithException # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ArithException :: [[*]] #

Generic All # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code All :: [[*]] #

Methods

from :: All -> Rep All #

to :: Rep All -> All #

Generic Any # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Any :: [[*]] #

Methods

from :: Any -> Rep Any #

to :: Rep Any -> Any #

Generic CChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CChar :: [[*]] #

Methods

from :: CChar -> Rep CChar #

to :: Rep CChar -> CChar #

Generic CSChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CSChar :: [[*]] #

Methods

from :: CSChar -> Rep CSChar #

to :: Rep CSChar -> CSChar #

Generic CUChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUChar :: [[*]] #

Methods

from :: CUChar -> Rep CUChar #

to :: Rep CUChar -> CUChar #

Generic CShort # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CShort :: [[*]] #

Methods

from :: CShort -> Rep CShort #

to :: Rep CShort -> CShort #

Generic CUShort # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUShort :: [[*]] #

Generic CInt # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CInt :: [[*]] #

Methods

from :: CInt -> Rep CInt #

to :: Rep CInt -> CInt #

Generic CUInt # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUInt :: [[*]] #

Methods

from :: CUInt -> Rep CUInt #

to :: Rep CUInt -> CUInt #

Generic CLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CLong :: [[*]] #

Methods

from :: CLong -> Rep CLong #

to :: Rep CLong -> CLong #

Generic CULong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CULong :: [[*]] #

Methods

from :: CULong -> Rep CULong #

to :: Rep CULong -> CULong #

Generic CLLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CLLong :: [[*]] #

Methods

from :: CLLong -> Rep CLLong #

to :: Rep CLLong -> CLLong #

Generic CULLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CULLong :: [[*]] #

Generic CFloat # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CFloat :: [[*]] #

Methods

from :: CFloat -> Rep CFloat #

to :: Rep CFloat -> CFloat #

Generic CDouble # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CDouble :: [[*]] #

Generic CPtrdiff # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CPtrdiff :: [[*]] #

Generic CSize # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CSize :: [[*]] #

Methods

from :: CSize -> Rep CSize #

to :: Rep CSize -> CSize #

Generic CWchar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CWchar :: [[*]] #

Methods

from :: CWchar -> Rep CWchar #

to :: Rep CWchar -> CWchar #

Generic CSigAtomic # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CSigAtomic :: [[*]] #

Generic CClock # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CClock :: [[*]] #

Methods

from :: CClock -> Rep CClock #

to :: Rep CClock -> CClock #

Generic CTime # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CTime :: [[*]] #

Methods

from :: CTime -> Rep CTime #

to :: Rep CTime -> CTime #

Generic CUSeconds # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUSeconds :: [[*]] #

Generic CSUSeconds # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CSUSeconds :: [[*]] #

Generic CIntPtr # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CIntPtr :: [[*]] #

Generic CUIntPtr # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUIntPtr :: [[*]] #

Generic CIntMax # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CIntMax :: [[*]] #

Generic CUIntMax # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code CUIntMax :: [[*]] #

Generic IOMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code IOMode :: [[*]] #

Methods

from :: IOMode -> Rep IOMode #

to :: Rep IOMode -> IOMode #

Generic Lexeme # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Lexeme :: [[*]] #

Methods

from :: Lexeme -> Rep Lexeme #

to :: Rep Lexeme -> Lexeme #

Generic Number # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Number :: [[*]] #

Methods

from :: Number -> Rep Number #

to :: Rep Number -> Number #

Generic GeneralCategory # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code GeneralCategory :: [[*]] #

Generic [a] # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code [a] :: [[*]] #

Methods

from :: [a] -> Rep [a] #

to :: Rep [a] -> [a] #

Generic (Maybe a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Maybe a) :: [[*]] #

Methods

from :: Maybe a -> Rep (Maybe a) #

to :: Rep (Maybe a) -> Maybe a #

Generic (Complex a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Complex a) :: [[*]] #

Methods

from :: Complex a -> Rep (Complex a) #

to :: Rep (Complex a) -> Complex a #

Generic (Fixed a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Fixed a) :: [[*]] #

Methods

from :: Fixed a -> Rep (Fixed a) #

to :: Rep (Fixed a) -> Fixed a #

Generic (ArgOrder a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (ArgOrder a) :: [[*]] #

Methods

from :: ArgOrder a -> Rep (ArgOrder a) #

to :: Rep (ArgOrder a) -> ArgOrder a #

Generic (OptDescr a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (OptDescr a) :: [[*]] #

Methods

from :: OptDescr a -> Rep (OptDescr a) #

to :: Rep (OptDescr a) -> OptDescr a #

Generic (ArgDescr a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (ArgDescr a) :: [[*]] #

Methods

from :: ArgDescr a -> Rep (ArgDescr a) #

to :: Rep (ArgDescr a) -> ArgDescr a #

Generic (First a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (First a) :: [[*]] #

Methods

from :: First a -> Rep (First a) #

to :: Rep (First a) -> First a #

Generic (Last a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Last a) :: [[*]] #

Methods

from :: Last a -> Rep (Last a) #

to :: Rep (Last a) -> Last a #

Generic (Dual a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Dual a) :: [[*]] #

Methods

from :: Dual a -> Rep (Dual a) #

to :: Rep (Dual a) -> Dual a #

Generic (Endo a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Endo a) :: [[*]] #

Methods

from :: Endo a -> Rep (Endo a) #

to :: Rep (Endo a) -> Endo a #

Generic (Sum a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Sum a) :: [[*]] #

Methods

from :: Sum a -> Rep (Sum a) #

to :: Rep (Sum a) -> Sum a #

Generic (Product a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Product a) :: [[*]] #

Methods

from :: Product a -> Rep (Product a) #

to :: Rep (Product a) -> Product a #

Generic (Down a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Down a) :: [[*]] #

Methods

from :: Down a -> Rep (Down a) #

to :: Rep (Down a) -> Down a #

Generic (I a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (I a) :: [[*]] #

Methods

from :: I a -> Rep (I a) #

to :: Rep (I a) -> I a #

Generic (Either a b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Either a b) :: [[*]] #

Methods

from :: Either a b -> Rep (Either a b) #

to :: Rep (Either a b) -> Either a b #

Generic (a, b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b) :: [[*]] #

Methods

from :: (a, b) -> Rep (a, b) #

to :: Rep (a, b) -> (a, b) #

Generic (Proxy t) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (Proxy t) :: [[*]] #

Methods

from :: Proxy t -> Rep (Proxy t) #

to :: Rep (Proxy t) -> Proxy t #

Generic (a, b, c) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c) :: [[*]] #

Methods

from :: (a, b, c) -> Rep (a, b, c) #

to :: Rep (a, b, c) -> (a, b, c) #

Generic (K a b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (K a b) :: [[*]] #

Methods

from :: K a b -> Rep (K a b) #

to :: Rep (K a b) -> K a b #

Generic (a, b, c, d) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d) :: [[*]] #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) #

to :: Rep (a, b, c, d) -> (a, b, c, d) #

Generic (a, b, c, d, e) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e) :: [[*]] #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) #

to :: Rep (a, b, c, d, e) -> (a, b, c, d, e) #

Generic ((f :.: g) p) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code ((f :.: g) p) :: [[*]] #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) #

to :: Rep ((f :.: g) p) -> (f :.: g) p #

Generic (a, b, c, d, e, f) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f) :: [[*]] #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) #

to :: Rep (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

Generic (a, b, c, d, e, f, g) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) #

to :: Rep (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

Generic (a, b, c, d, e, f, g, h) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) #

to :: Rep (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

Generic (a, b, c, d, e, f, g, h, i) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) #

to :: Rep (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #

Generic (a, b, c, d, e, f, g, h, i, j) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) #

to :: Rep (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #

Generic (a, b, c, d, e, f, g, h, i, j, k) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) :: [[*]] #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) #

class HasDatatypeInfo a where #

A class of datatypes that have associated metadata.

It is possible to use the sum-of-products approach to generic programming without metadata. If you need metadata in a function, an additional constraint on this class is in order.

You typically don't define instances of this class by hand, but rather derive the class instance automatically. See the documentation of Generic for the options.

Associated Types

type DatatypeInfoOf a :: DatatypeInfo #

Type-level datatype info

Methods

datatypeInfo :: proxy a -> DatatypeInfo (Code a) #

Term-level datatype info; by default, the term-level datatype info is produced from the type-level info.

datatypeInfo :: (GDatatypeInfo a, GCode a ~ Code a) => proxy a -> DatatypeInfo (Code a) #

Term-level datatype info; by default, the term-level datatype info is produced from the type-level info.

Instances
HasDatatypeInfo Bool # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Bool :: DatatypeInfo #

Methods

datatypeInfo :: proxy Bool -> DatatypeInfo (Code Bool) #

HasDatatypeInfo Ordering # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Ordering :: DatatypeInfo #

HasDatatypeInfo () # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf () :: DatatypeInfo #

Methods

datatypeInfo :: proxy () -> DatatypeInfo (Code ()) #

HasDatatypeInfo DataRep # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf DataRep :: DatatypeInfo #

HasDatatypeInfo ConstrRep # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf ConstrRep :: DatatypeInfo #

HasDatatypeInfo Fixity # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Fixity :: DatatypeInfo #

HasDatatypeInfo FormatAdjustment # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo FormatSign # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf FormatSign :: DatatypeInfo #

HasDatatypeInfo FieldFormat # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf FieldFormat :: DatatypeInfo #

HasDatatypeInfo FormatParse # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf FormatParse :: DatatypeInfo #

HasDatatypeInfo Version # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Version :: DatatypeInfo #

HasDatatypeInfo PatternMatchFail # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo RecSelError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf RecSelError :: DatatypeInfo #

HasDatatypeInfo RecConError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf RecConError :: DatatypeInfo #

HasDatatypeInfo RecUpdError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf RecUpdError :: DatatypeInfo #

HasDatatypeInfo NoMethodError # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf NoMethodError :: DatatypeInfo #

HasDatatypeInfo NonTermination # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo NestedAtomically # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo Errno # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Errno :: DatatypeInfo #

Methods

datatypeInfo :: proxy Errno -> DatatypeInfo (Code Errno) #

HasDatatypeInfo BlockedIndefinitelyOnMVar # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo BlockedIndefinitelyOnSTM # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo Deadlock # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Deadlock :: DatatypeInfo #

HasDatatypeInfo AssertionFailed # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo AsyncException # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo ArrayException # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo ExitCode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf ExitCode :: DatatypeInfo #

HasDatatypeInfo BufferMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf BufferMode :: DatatypeInfo #

HasDatatypeInfo Newline # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Newline :: DatatypeInfo #

HasDatatypeInfo NewlineMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf NewlineMode :: DatatypeInfo #

HasDatatypeInfo SeekMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf SeekMode :: DatatypeInfo #

HasDatatypeInfo MaskingState # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf MaskingState :: DatatypeInfo #

HasDatatypeInfo IOException # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf IOException :: DatatypeInfo #

HasDatatypeInfo ErrorCall # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf ErrorCall :: DatatypeInfo #

HasDatatypeInfo ArithException # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo All # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf All :: DatatypeInfo #

Methods

datatypeInfo :: proxy All -> DatatypeInfo (Code All) #

HasDatatypeInfo Any # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Any :: DatatypeInfo #

Methods

datatypeInfo :: proxy Any -> DatatypeInfo (Code Any) #

HasDatatypeInfo CChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CChar :: DatatypeInfo #

Methods

datatypeInfo :: proxy CChar -> DatatypeInfo (Code CChar) #

HasDatatypeInfo CSChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CSChar :: DatatypeInfo #

HasDatatypeInfo CUChar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUChar :: DatatypeInfo #

HasDatatypeInfo CShort # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CShort :: DatatypeInfo #

HasDatatypeInfo CUShort # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUShort :: DatatypeInfo #

HasDatatypeInfo CInt # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CInt :: DatatypeInfo #

Methods

datatypeInfo :: proxy CInt -> DatatypeInfo (Code CInt) #

HasDatatypeInfo CUInt # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUInt :: DatatypeInfo #

Methods

datatypeInfo :: proxy CUInt -> DatatypeInfo (Code CUInt) #

HasDatatypeInfo CLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CLong :: DatatypeInfo #

Methods

datatypeInfo :: proxy CLong -> DatatypeInfo (Code CLong) #

HasDatatypeInfo CULong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CULong :: DatatypeInfo #

HasDatatypeInfo CLLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CLLong :: DatatypeInfo #

HasDatatypeInfo CULLong # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CULLong :: DatatypeInfo #

HasDatatypeInfo CFloat # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CFloat :: DatatypeInfo #

HasDatatypeInfo CDouble # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CDouble :: DatatypeInfo #

HasDatatypeInfo CPtrdiff # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CPtrdiff :: DatatypeInfo #

HasDatatypeInfo CSize # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CSize :: DatatypeInfo #

Methods

datatypeInfo :: proxy CSize -> DatatypeInfo (Code CSize) #

HasDatatypeInfo CWchar # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CWchar :: DatatypeInfo #

HasDatatypeInfo CSigAtomic # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CSigAtomic :: DatatypeInfo #

HasDatatypeInfo CClock # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CClock :: DatatypeInfo #

HasDatatypeInfo CTime # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CTime :: DatatypeInfo #

Methods

datatypeInfo :: proxy CTime -> DatatypeInfo (Code CTime) #

HasDatatypeInfo CUSeconds # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUSeconds :: DatatypeInfo #

HasDatatypeInfo CSUSeconds # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CSUSeconds :: DatatypeInfo #

HasDatatypeInfo CIntPtr # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CIntPtr :: DatatypeInfo #

HasDatatypeInfo CUIntPtr # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUIntPtr :: DatatypeInfo #

HasDatatypeInfo CIntMax # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CIntMax :: DatatypeInfo #

HasDatatypeInfo CUIntMax # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf CUIntMax :: DatatypeInfo #

HasDatatypeInfo IOMode # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf IOMode :: DatatypeInfo #

HasDatatypeInfo Lexeme # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Lexeme :: DatatypeInfo #

HasDatatypeInfo Number # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Number :: DatatypeInfo #

HasDatatypeInfo GeneralCategory # 
Instance details

Defined in Generics.SOP.Instances

HasDatatypeInfo [a] # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf [a] :: DatatypeInfo #

Methods

datatypeInfo :: proxy [a] -> DatatypeInfo (Code [a]) #

HasDatatypeInfo (Maybe a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Maybe a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Maybe a) -> DatatypeInfo (Code (Maybe a)) #

HasDatatypeInfo (Complex a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Complex a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Complex a) -> DatatypeInfo (Code (Complex a)) #

HasDatatypeInfo (Fixed a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Fixed a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Fixed a) -> DatatypeInfo (Code (Fixed a)) #

HasDatatypeInfo (ArgOrder a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (ArgOrder a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (ArgOrder a) -> DatatypeInfo (Code (ArgOrder a)) #

HasDatatypeInfo (OptDescr a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (OptDescr a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (OptDescr a) -> DatatypeInfo (Code (OptDescr a)) #

HasDatatypeInfo (ArgDescr a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (ArgDescr a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (ArgDescr a) -> DatatypeInfo (Code (ArgDescr a)) #

HasDatatypeInfo (First a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (First a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (First a) -> DatatypeInfo (Code (First a)) #

HasDatatypeInfo (Last a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Last a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Last a) -> DatatypeInfo (Code (Last a)) #

HasDatatypeInfo (Dual a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Dual a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Dual a) -> DatatypeInfo (Code (Dual a)) #

HasDatatypeInfo (Endo a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Endo a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Endo a) -> DatatypeInfo (Code (Endo a)) #

HasDatatypeInfo (Sum a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Sum a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Sum a) -> DatatypeInfo (Code (Sum a)) #

HasDatatypeInfo (Product a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Product a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Product a) -> DatatypeInfo (Code (Product a)) #

HasDatatypeInfo (Down a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Down a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Down a) -> DatatypeInfo (Code (Down a)) #

HasDatatypeInfo (I a) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (I a) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (I a) -> DatatypeInfo (Code (I a)) #

HasDatatypeInfo (Either a b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Either a b) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Either a b) -> DatatypeInfo (Code (Either a b)) #

HasDatatypeInfo (a, b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b) -> DatatypeInfo (Code (a, b)) #

HasDatatypeInfo (Proxy t) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (Proxy t) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (Proxy t) -> DatatypeInfo (Code (Proxy t)) #

HasDatatypeInfo (a, b, c) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c) -> DatatypeInfo (Code (a, b, c)) #

HasDatatypeInfo (K a b) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (K a b) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (K a b) -> DatatypeInfo (Code (K a b)) #

HasDatatypeInfo (a, b, c, d) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d) -> DatatypeInfo (Code (a, b, c, d)) #

HasDatatypeInfo (a, b, c, d, e) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e) -> DatatypeInfo (Code (a, b, c, d, e)) #

HasDatatypeInfo ((f :.: g) p) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf ((f :.: g) p) :: DatatypeInfo #

Methods

datatypeInfo :: proxy ((f :.: g) p) -> DatatypeInfo (Code ((f :.: g) p)) #

HasDatatypeInfo (a, b, c, d, e, f) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f) -> DatatypeInfo (Code (a, b, c, d, e, f)) #

HasDatatypeInfo (a, b, c, d, e, f, g) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g) -> DatatypeInfo (Code (a, b, c, d, e, f, g)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28)) #

HasDatatypeInfo (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) # 
Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) :: DatatypeInfo #

Methods

datatypeInfo :: proxy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29) -> DatatypeInfo (Code (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, t26, t27, t28, t29)) #

type IsProductType (a :: *) (xs :: [*]) = (Generic a, Code a ~ '[xs]) #

Constraint that captures that a datatype is a product type, i.e., a type with a single constructor.

It also gives access to the code for the arguments of that constructor.

Since: generics-sop-0.3.1.0

type IsEnumType (a :: *) = (Generic a, All ((~) '[]) (Code a)) #

Constraint that captures that a datatype is an enumeration type, i.e., none of the constructors have any arguments.

Since: generics-sop-0.3.1.0

type IsWrappedType (a :: *) (x :: *) = (Generic a, Code a ~ '['[x]]) #

Constraint that captures that a datatype is a single-constructor, single-field datatype. This always holds for newtype-defined types, but it can also be true for data-defined types.

The constraint also gives access to the type that is wrapped.

Since: generics-sop-0.3.1.0

type IsNewtype (a :: *) (x :: *) = (IsWrappedType a x, Coercible a x) #

Constraint that captures that a datatype is a newtype. This makes use of the fact that newtypes are always coercible to the type they wrap, whereas datatypes are not.

Since: generics-sop-0.3.1.0