base-4.10.1.0: Basic libraries

Copyright | (c) Universiteit Utrecht 2010-2011 University of Oxford 2012-2014
License | see libraries/base/LICENSE
Maintainer | libraries@haskell.org
Stability | internal
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell2010

GHC.Generics

Contents

- Introduction
  - Representing datatypes
  - Derived and fundamental representation types
    - Individual fields of constructors: `K1`
    - Meta information: `M1`
    - Additional generic representation type constructors
      - Empty datatypes: `V1`
      - Constructors without fields: `U1`
    - Representation of types with many constructors or many fields
  - Defining datatype-generic functions
    - Definition of the generic representation types
    - Generic instances
    - The wrapper and generic default
    - Omitting generic instances
  - Generic constructor classes
    - The `Generic1` class
    - Representation of `* -> *` types
    - Representation of `k -> *` types
    - Representation of unlifted types
- Generic representation types
  - Unboxed representation types
  - Synonyms for convenience
- Meta-information
- Generic type classes

Description

If you're using `GHC.Generics`, you should consider using the http://hackage.haskell.org/package/generic-deriving package, which contains many useful generic functions.

Since: 4.6.0.0

Synopsis

- data V1 (p :: k)
- data U1 (p :: k) = U1
- newtype Par1 p = Par1 {
  - unPar1 :: p
  }
- newtype Rec1 (f :: k -> *) (p :: k) = Rec1 {
  - unRec1 :: f p
  }
- newtype K1 (i :: *) c (p :: k) = K1 {
  - unK1 :: c
  }
- newtype M1 (i :: *) (c :: Meta) (f :: k -> *) (p :: k) = M1 {
  - unM1 :: f p
  }
- data ((f :: k -> *) :+: (g :: k -> *)) (p :: k)
  - = L1 (f p)
  - | R1 (g p)
- data ((f :: k -> *) :*: (g :: k -> *)) (p :: k) = (f p) :*: (g p)
- newtype ((f :: k2 -> *) :.: (g :: k1 -> k2)) (p :: k1) = Comp1 {
  - unComp1 :: f (g p)
  }
- data family URec (a :: *) (p :: k)
- type UAddr = URec (Ptr ())
- type UChar = URec Char
- type UDouble = URec Double
- type UFloat = URec Float
- type UInt = URec Int
- type UWord = URec Word
- type Rec0 = K1 R
- data R
- type D1 = M1 D
- type C1 = M1 C
- type S1 = M1 S
- data D
- data C
- data S
- class Datatype d where
- class Constructor c where
- class Selector s where
- data Fixity
  - = Prefix
  - | Infix Associativity Int
- data FixityI
  - = PrefixI
  - | InfixI Associativity Nat
- data Associativity
  - = LeftAssociative
  - | RightAssociative
  - | NotAssociative
- prec :: Fixity -> Int
- data SourceUnpackedness
  - = NoSourceUnpackedness
  - | SourceNoUnpack
  - | SourceUnpack
- data SourceStrictness
  - = NoSourceStrictness
  - | SourceLazy
  - | SourceStrict
- data DecidedStrictness
  - = DecidedLazy
  - | DecidedStrict
  - | DecidedUnpack
- data Meta
  - = MetaData Symbol Symbol Symbol Bool
  - | MetaCons Symbol FixityI Bool
  - | MetaSel (Maybe Symbol) SourceUnpackedness SourceStrictness DecidedStrictness
- class Generic a where
  - type Rep a :: * -> *
- class Generic1 (f :: k -> *) where
  - type Rep1 f :: k -> *

# Introduction

Datatype-generic functions are based on the idea of converting values of a datatype `T` into corresponding values of a (nearly) isomorphic type ``Rep` T`. The type ``Rep` T` is built from a limited set of type constructors, all provided by this module. A datatype-generic function is then an overloaded function with instances for most of these type constructors, together with a wrapper that performs the mapping between `T` and ``Rep` T`. By using this technique, we merely need a few generic instances in order to implement functionality that works for any representable type.

Representable types are collected in the `Generic` class, which defines the associated type `Rep` as well as conversion functions `from` and `to`. Typically, you will not define `Generic` instances by hand, but have the compiler derive them for you.

## Representing datatypes

The key to defining your own datatype-generic functions is to understand how to represent datatypes using the given set of type constructors.

Let us look at an example first:

    data Tree a = Leaf a | Node (Tree a) (Tree a)
      deriving Generic

The above declaration (which requires the language pragma `DeriveGeneric`) causes the following representation to be generated:

    instance Generic (Tree a) where
      type Rep (Tree a) =
        D1 ('MetaData "Tree" "Main" "package-name" 'False)
          (C1 ('MetaCons "Leaf" 'PrefixI 'False)
             (S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                    (Rec0 a))
           :+:
           C1 ('MetaCons "Node" 'PrefixI 'False)
             (S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                   (Rec0 (Tree a))
              :*:
              S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                   (Rec0 (Tree a))))
      ...

Hint: You can obtain information about the code being generated from GHC by passing the `-ddump-deriv` flag. In GHCi, you can expand a type family such as `Rep` using the `:kind!` command.

This is a lot of information! However, most of it is actually merely meta-information that makes names of datatypes and constructors and more available on the type level.

Here is a reduced representation for `Tree` with nearly all meta-information removed, for now keeping only the most essential aspects:

    instance Generic (Tree a) where
      type Rep (Tree a) =
        Rec0 a
        :+:
        (Rec0 (Tree a) :*: Rec0 (Tree a))

The `Tree` datatype has two constructors. The representation of individual constructors is combined using the binary type constructor `:+:`.

The first constructor consists of a single field, which is the parameter `a`. This is represented as ``Rec0` a`.

The second constructor consists of two fields. Each is a recursive field of type `Tree a`, represented as ``Rec0` (Tree a)`. Representations of individual fields are combined using the binary type constructor `:*:`.

Now let us explain the additional tags being used in the complete representation:

- The ``S1` ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)` tag indicates several things. The `'Nothing` indicates that there is no record field selector associated with this field of the constructor (if there were, it would have been marked `'Just "recordName"` instead). The other types contain meta-information on the field's strictness:
- There is no `{-# UNPACK #-}` or `{-# NOUNPACK #-}` annotation in the source, so it is tagged with `'NoSourceUnpackedness`.
- There is no strictness (`!`) or laziness (`~`) annotation in the source, so it is tagged with `'NoSourceStrictness`.
- The compiler infers that the field is lazy, so it is tagged with `'DecidedLazy`. Bear in mind that what the compiler decides may be quite different from what is written in the source. See `DecidedStrictness` for a more detailed explanation.

The `'MetaSel` type is also an instance of the type class `Selector`, which can be used to obtain information about the field at the value level.

- The ``C1` ('MetaCons "Leaf" 'PrefixI 'False)` and ``C1` ('MetaCons "Node" 'PrefixI 'False)` invocations indicate that the enclosed part is the representation of the first and second constructor of datatype `Tree`, respectively. Here, the meta-information regarding constructor names, fixity and whether it has named fields or not is encoded at the type level. The `'MetaCons` type is also an instance of the type class `Constructor`. This type class can be used to obtain information about the constructor at the value level.
- The ``D1` ('MetaData "Tree" "Main" "package-name" 'False)` tag indicates that the enclosed part is the representation of the datatype `Tree`. Again, the meta-information is encoded at the type level. The `'MetaData` type is an instance of class `Datatype`, which can be used to obtain the name of a datatype, the module it has been defined in, the package it is located under, and whether it has been defined using `data` or `newtype` at the value level.

## Derived and fundamental representation types

There are many datatype-generic functions that do not distinguish between positions that are parameters or positions that are recursive calls. There are also many datatype-generic functions that do not care about the names of datatypes and constructors at all. To keep the number of cases to consider in generic functions in such a situation to a minimum, it turns out that many of the type constructors introduced above are actually synonyms, defining them to be variants of a smaller set of constructors.

### Individual fields of constructors: `K1`

The type constructor `Rec0` is a variant of `K1`:

    type Rec0 = K1 R

Here, `R` is a type-level proxy that does not have any associated values.

There used to be another variant of `K1` (namely `Par0`), but it has since been deprecated.

### Meta information: `M1`

The type constructors `S1`, `C1` and `D1` are all variants of `M1`:

    type S1 = M1 S
    type C1 = M1 C
    type D1 = M1 D

The types `S`, `C` and `D` are once again type-level proxies, just used to create several variants of `M1`.

### Additional generic representation type constructors

Next to `K1`, `M1`, `:+:` and `:*:` there are a few more type constructors that occur in the representations of other datatypes.

#### Empty datatypes: `V1`

For empty datatypes, `V1` is used as a representation. For example,

    data Empty deriving Generic

yields

    instance Generic Empty where
      type Rep Empty =
        D1 ('MetaData "Empty" "Main" "package-name" 'False) V1

#### Constructors without fields: `U1`

If a constructor has no arguments, then `U1` is used as its representation. For example the representation of `Bool` is

    instance Generic Bool where
      type Rep Bool =
        D1 ('MetaData "Bool" "Data.Bool" "package-name" 'False)
          (C1 ('MetaCons "False" 'PrefixI 'False) U1 :+: C1 ('MetaCons "True" 'PrefixI 'False) U1)

### Representation of types with many constructors or many fields

As `:+:` and `:*:` are just binary operators, one might ask what happens if the datatype has more than two constructors, or a constructor with more than two fields. The answer is simple: the operators are used several times, to combine all the constructors and fields as needed. However, users /should not rely on a specific nesting strategy/ for `:+:` and `:*:` being used. The compiler is free to choose any nesting it prefers. (In practice, the current implementation tries to produce a more or less balanced nesting, so that the traversal of the structure of the datatype from the root to a particular component can be performed in logarithmic rather than linear time.)

## Defining datatype-generic functions

A datatype-generic function comprises two parts:

1. Generic instances for the function, implementing it for most of the representation type constructors introduced above.
2. A wrapper that for any datatype that is in `Generic`, performs the conversion between the original value and its `Rep`-based representation and then invokes the generic instances.

As an example, let us look at a function `encode` that produces a naive, but lossless bit encoding of values of various datatypes. So we are aiming to define a function

    encode :: Generic a => a -> [Bool]

where we use `Bool` as our datatype for bits.

For part 1, we define a class `Encode'`. Perhaps surprisingly, this class is parameterized over a type constructor `f` of kind `* -> *`. This is a technicality: all the representation type constructors operate with kind `* -> *` as base kind. But the type argument is never being used. This may be changed at some point in the future. The class has a single method, and we use the type we want our final function to have, but we replace the occurrences of the generic type argument `a` with `f p` (where the `p` is any argument; it will not be used).

    class Encode' f where
      encode' :: f p -> [Bool]

With the goal in mind to make `encode` work on `Tree` and other datatypes, we now define instances for the representation type constructors `V1`, `U1`, `:+:`, `:*:`, `K1`, and `M1`.

### Definition of the generic representation types

In order to be able to do this, we need to know the actual definitions of these types:

    data    V1        p                       -- lifted version of Empty
    data    U1        p = U1                  -- lifted version of ()
    data    (:+:) f g p = L1 (f p) | R1 (g p) -- lifted version of Either
    data    (:*:) f g p = (f p) :*: (g p)     -- lifted version of (,)
    newtype K1    i c p = K1 { unK1 :: c }    -- a container for a c
    newtype M1  i t f p = M1 { unM1 :: f p }  -- a wrapper

So, `U1` is just the unit type, `:+:` is just a binary choice like `Either`, `:*:` is a binary pair like the pair constructor `(,)`, and `K1` is a value of a specific type `c`, and `M1` wraps a value of the generic type argument, which in the lifted world is an `f p` (where we do not care about `p`).

### Generic instances

The instance for `V1` is slightly awkward (but also rarely used):

    instance Encode' V1 where
      encode' x = undefined

There are no values of type `V1 p` to pass (except undefined), so this is actually impossible. One can ask why it is useful to define an instance for `V1` at all in this case? Well, an empty type can be used as an argument to a non-empty type, and you might still want to encode the resulting type. As a somewhat contrived example, consider `[Empty]`, which is not an empty type, but contains just the empty list. The `V1` instance ensures that we can call the generic function on such types.

There is exactly one value of type `U1`, so encoding it requires no knowledge, and we can use zero bits:

    instance Encode' U1 where
      encode' U1 = []

In the case for `:+:`, we produce `False` or `True` depending on whether the constructor of the value provided is located on the left or on the right:

    instance (Encode' f, Encode' g) => Encode' (f :+: g) where
      encode' (L1 x) = False : encode' x
      encode' (R1 x) = True  : encode' x

In the case for `:*:`, we append the encodings of the two subcomponents:

    instance (Encode' f, Encode' g) => Encode' (f :*: g) where
      encode' (x :*: y) = encode' x ++ encode' y

The case for `K1` is rather interesting. Here, we call the final function `encode` that we yet have to define, recursively. We will use another type class `Encode` for that function:

    instance (Encode c) => Encode' (K1 i c) where
      encode' (K1 x) = encode x

Note how `Par0` and `Rec0` both being mapped to `K1` allows us to define a uniform instance here.

Similarly, we can define a uniform instance for `M1`, because we completely disregard all meta-information:

    instance (Encode' f) => Encode' (M1 i t f) where
      encode' (M1 x) = encode' x

Unlike in `K1`, the instance for `M1` refers to `encode'`, not `encode`.

### The wrapper and generic default

We now define class `Encode` for the actual `encode` function:

    class Encode a where
      encode :: a -> [Bool]
      default encode :: (Generic a, Encode' (Rep a)) => a -> [Bool]
      encode x = encode' (from x)

The incoming `x` is converted using `from`, then we dispatch to the generic instances using `encode'`. We use this as a default definition for `encode`. We need the 'default encode' signature because ordinary Haskell default methods must not introduce additional class constraints, but our generic default does.

Defining a particular instance is now as simple as saying

    instance (Encode a) => Encode (Tree a)

### Omitting generic instances

It is not always required to provide instances for all the generic representation types, but omitting instances restricts the set of datatypes the functions will work for:

- If no `:+:` instance is given, the function may still work for empty datatypes or datatypes that have a single constructor, but will fail on datatypes with more than one constructor.
- If no `:*:` instance is given, the function may still work for datatypes where each constructor has just zero or one field, in particular for enumeration types.
- If no `K1` instance is given, the function may still work for enumeration types, where no constructor has any fields.
- If no `V1` instance is given, the function may still work for any datatype that is not empty.
- If no `U1` instance is given, the function may still work for any datatype where each constructor has at least one field.

An `M1` instance is always required (but it can just ignore the meta-information, as is the case for `encode` above).

## Generic constructor classes

Datatype-generic functions as defined above work for a large class of datatypes, including parameterized datatypes. (We have used `Tree` as our example above, which is of kind `* -> *`.) However, the `Generic` class ranges over types of kind `*`, and therefore, the resulting generic functions (such as `encode`) must be parameterized by a generic type argument of kind `*`.

What if we want to define generic classes that range over type constructors (such as `Functor`, `Traversable`, or `Foldable`)?

### The `Generic1` class

Like `Generic`, there is a class `Generic1` that defines a representation `Rep1` and conversion functions `from1` and `to1`, only that `Generic1` ranges over types of kind `* -> *`. (More generally, it can range over types of kind `k -> *`, for any kind `k`, if the `PolyKinds` extension is enabled. More on this later.) The `Generic1` class is also derivable.

The representation `Rep1` is ever so slightly different from `Rep`. Let us look at `Tree` as an example again:

    data Tree a = Leaf a | Node (Tree a) (Tree a)
      deriving Generic1

The above declaration causes the following representation to be generated:

    instance Generic1 Tree where
      type Rep1 Tree =
        D1 ('MetaData "Tree" "Main" "package-name" 'False)
          (C1 ('MetaCons "Leaf" 'PrefixI 'False)
             (S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                   Par1)
           :+:
           C1 ('MetaCons "Node" 'PrefixI 'False)
             (S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                   (Rec1 Tree)
              :*:
              S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                   (Rec1 Tree)))
      ...

The representation reuses `D1`, `C1`, `S1` (and thereby `M1`) as well as `:+:` and `:*:` from `Rep`. (This reusability is the reason that we carry around the dummy type argument for kind-`*`-types, but there are already enough different names involved without duplicating each of these.)

What's different is that we now use `Par1` to refer to the parameter (and that parameter, which used to be `a`), is not mentioned explicitly by name anywhere; and we use `Rec1` to refer to a recursive use of `Tree a`.

### Representation of `* -> *` types

Unlike `Rec0`, the `Par1` and `Rec1` type constructors do not map to `K1`. They are defined directly, as follows:

    newtype Par1   p = Par1 { unPar1 ::   p } -- gives access to parameter p
    newtype Rec1 f p = Rec1 { unRec1 :: f p } -- a wrapper

In `Par1`, the parameter `p` is used for the first time, whereas `Rec1` simply wraps an application of `f` to `p`.

Note that `K1` (in the guise of `Rec0`) can still occur in a `Rep1` representation, namely when the datatype has a field that does not mention the parameter.

The declaration

    data WithInt a = WithInt Int a
      deriving Generic1

yields

    instance Generic1 WithInt where
      type Rep1 WithInt =
        D1 ('MetaData "WithInt" "Main" "package-name" 'False)
          (C1 ('MetaCons "WithInt" 'PrefixI 'False)
            (S1 ('MetaSel 'Nothing
                            'NoSourceUnpackedness
                            'NoSourceStrictness
                            'DecidedLazy)
                  (Rec0 Int)
             :*:
             S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                  Par1))

If the parameter `a` appears underneath a composition of other type constructors, then the representation involves composition, too:

    data Rose a = Fork a [Rose a]

yields

    instance Generic1 Rose where
      type Rep1 Rose =
        D1 ('MetaData "Rose" "Main" "package-name" 'False)
          (C1 ('MetaCons "Fork" 'PrefixI 'False)
            (S1 ('MetaSel 'Nothing
                            'NoSourceUnpackedness
                            'NoSourceStrictness
                            'DecidedLazy)
                  Par1
             :*:
             S1 ('MetaSel 'Nothing
                             'NoSourceUnpackedness
                             'NoSourceStrictness
                             'DecidedLazy)
                  ([] :.: Rec1 Rose)))

where

    newtype (:.:) f g p = Comp1 { unComp1 :: f (g p) }

### Representation of `k -> *` types

The `Generic1` class can be generalized to range over types of kind `k -> *`, for any kind `k`. To do so, derive a `Generic1` instance with the `PolyKinds` extension enabled. For example, the declaration

    data Proxy (a :: k) = Proxy deriving Generic1

yields a slightly different instance depending on whether `PolyKinds` is enabled. If compiled without `PolyKinds`, then ``Rep1` Proxy :: * -> *`, but if compiled with `PolyKinds`, then ``Rep1` Proxy :: k -> *`.

### Representation of unlifted types

If one were to attempt to derive a Generic instance for a datatype with an unlifted argument (for example, `Int#`), one might expect the occurrence of the `Int#` argument to be marked with ``Rec0` `Int#``. This won't work, though, since `Int#` is of an unlifted kind, and `Rec0` expects a type of kind `*`.

One solution would be to represent an occurrence of `Int#` with 'Rec0 Int' instead. With this approach, however, the programmer has no way of knowing whether the `Int` is actually an `Int#` in disguise.

Instead of reusing `Rec0`, a separate data family `URec` is used to mark occurrences of common unlifted types:

    data family URec a p

    data instance URec (Ptr ()) p = UAddr   { uAddr#   :: Addr#   }
    data instance URec Char     p = UChar   { uChar#   :: Char#   }
    data instance URec Double   p = UDouble { uDouble# :: Double# }
    data instance URec Int      p = UFloat  { uFloat#  :: Float#  }
    data instance URec Float    p = UInt    { uInt#    :: Int#    }
    data instance URec Word     p = UWord   { uWord#   :: Word#   }

Several type synonyms are provided for convenience:

    type UAddr   = URec (Ptr ())
    type UChar   = URec Char
    type UDouble = URec Double
    type UFloat  = URec Float
    type UInt    = URec Int
    type UWord   = URec Word

The declaration

    data IntHash = IntHash Int#
      deriving Generic

yields

    instance Generic IntHash where
      type Rep IntHash =
        D1 ('MetaData "IntHash" "Main" "package-name" 'False)
          (C1 ('MetaCons "IntHash" 'PrefixI 'False)
            (S1 ('MetaSel 'Nothing
                            'NoSourceUnpackedness
                            'NoSourceStrictness
                            'DecidedLazy)
                  UInt))

Currently, only the six unlifted types listed above are generated, but this may be extended to encompass more unlifted types in the future.

# Generic representation types

data V1 (p :: k) #

Void: used for datatypes without constructors

Instances

Generic1 k (V1 k) # |
Associated Types type Rep1 (V1 k) (f :: V1 k -> *) :: k -> * # Methods from1 :: f a -> Rep1 (V1 k) f a # to1 :: Rep1 (V1 k) f a -> f a #
Functor (V1 *) # |
Methods fmap :: (a -> b) -> V1 * a -> V1 * b # (<$) :: a -> V1 * b -> V1 * a #
Foldable (V1 *) # |

Methods

fold :: Monoid m => V1 * m -> m #

foldMap :: Monoid m => (a -> m) -> V1 * a -> m #

foldr :: (a -> b -> b) -> b -> V1 * a -> b #

foldr' :: (a -> b -> b) -> b -> V1 * a -> b #

foldl :: (b -> a -> b) -> b -> V1 * a -> b #

foldl' :: (b -> a -> b) -> b -> V1 * a -> b #

foldr1 :: (a -> a -> a) -> V1 * a -> a #

foldl1 :: (a -> a -> a) -> V1 * a -> a #

toList :: V1 * a -> [a] #

null :: V1 * a -> Bool #

length :: V1 * a -> Int #

elem :: Eq a => a -> V1 * a -> Bool #

maximum :: Ord a => V1 * a -> a #

minimum :: Ord a => V1 * a -> a #

sum :: Num a => V1 * a -> a #

product :: Num a => V1 * a -> a #

Traversable (V1 *) # |
Methods traverse :: Applicative f => (a -> f b) -> V1 * a -> f (V1 * b) # sequenceA :: Applicative f => V1 * (f a) -> f (V1 * a) # mapM :: Monad m => (a -> m b) -> V1 * a -> m (V1 * b) # sequence :: Monad m => V1 * (m a) -> m (V1 * a) #
Eq (V1 k p) # |
Methods (==) :: V1 k p -> V1 k p -> Bool Source # (/=) :: V1 k p -> V1 k p -> Bool Source #
Data p => Data (V1 * p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V1 * p -> c (V1 * p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V1 * p) #

toConstr :: V1 * p -> Constr #

dataTypeOf :: V1 * p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V1 * p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V1 * p)) #

gmapT :: (forall b. Data b => b -> b) -> V1 * p -> V1 * p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V1 * p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V1 * p -> r #

gmapQ :: (forall d. Data d => d -> u) -> V1 * p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V1 * p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V1 * p -> m (V1 * p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 * p -> m (V1 * p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 * p -> m (V1 * p) #

Ord (V1 k p) # |
Methods compare :: V1 k p -> V1 k p -> Ordering Source # (<) :: V1 k p -> V1 k p -> Bool Source # (<=) :: V1 k p -> V1 k p -> Bool Source # (>) :: V1 k p -> V1 k p -> Bool Source # (>=) :: V1 k p -> V1 k p -> Bool Source # max :: V1 k p -> V1 k p -> V1 k p Source # min :: V1 k p -> V1 k p -> V1 k p Source #
Read (V1 k p) # |
Methods readsPrec :: Int -> ReadS (V1 k p) # readList :: ReadS [V1 k p] # readPrec :: ReadPrec (V1 k p) # readListPrec :: ReadPrec [V1 k p] #
Show (V1 k p) # |
Methods showsPrec :: Int -> V1 k p -> ShowS # show :: V1 k p -> String # showList :: [V1 k p] -> ShowS #
Generic (V1 k p) # |
Associated Types type Rep (V1 k p) :: * -> * # Methods from :: V1 k p -> Rep (V1 k p) x # to :: Rep (V1 k p) x -> V1 k p #
type Rep1 k (V1 k) # |
type Rep1 k (V1 k) = D1 k (MetaData "V1" "GHC.Generics" "base" False) (V1 k)
type Rep (V1 k p) # |
type Rep (V1 k p) = D1 * (MetaData "V1" "GHC.Generics" "base" False) (V1 *)

data U1 (p :: k) #

Unit: used for constructors without arguments

Constructors

U1 |

Instances

Generic1 k (U1 k) # |
Associated Types type Rep1 (U1 k) (f :: U1 k -> *) :: k -> * # Methods from1 :: f a -> Rep1 (U1 k) f a # to1 :: Rep1 (U1 k) f a -> f a #
Monad (U1 *) # | Since: 4.9.0.0
Methods (>>=) :: U1 * a -> (a -> U1 * b) -> U1 * b # (>>) :: U1 * a -> U1 * b -> U1 * b # return :: a -> U1 * a # fail :: String -> U1 * a #
Functor (U1 *) # | Since: 4.9.0.0
Methods fmap :: (a -> b) -> U1 * a -> U1 * b # (<$) :: a -> U1 * b -> U1 * a #
Applicative (U1 *) # | Since: 4.9.0.0
Methods pure :: a -> U1 * a # (<*>) :: U1 * (a -> b) -> U1 * a -> U1 * b # liftA2 :: (a -> b -> c) -> U1 * a -> U1 * b -> U1 * c # (*>) :: U1 * a -> U1 * b -> U1 * b # (<*) :: U1 * a -> U1 * b -> U1 * a #
Foldable (U1 *) # | Since: 4.9.0.0

Methods

fold :: Monoid m => U1 * m -> m #

foldMap :: Monoid m => (a -> m) -> U1 * a -> m #

foldr :: (a -> b -> b) -> b -> U1 * a -> b #

foldr' :: (a -> b -> b) -> b -> U1 * a -> b #

foldl :: (b -> a -> b) -> b -> U1 * a -> b #

foldl' :: (b -> a -> b) -> b -> U1 * a -> b #

foldr1 :: (a -> a -> a) -> U1 * a -> a #

foldl1 :: (a -> a -> a) -> U1 * a -> a #

toList :: U1 * a -> [a] #

null :: U1 * a -> Bool #

length :: U1 * a -> Int #

elem :: Eq a => a -> U1 * a -> Bool #

maximum :: Ord a => U1 * a -> a #

minimum :: Ord a => U1 * a -> a #

sum :: Num a => U1 * a -> a #

product :: Num a => U1 * a -> a #

Traversable (U1 *) # | Since: 4.9.0.0
Methods traverse :: Applicative f => (a -> f b) -> U1 * a -> f (U1 * b) # sequenceA :: Applicative f => U1 * (f a) -> f (U1 * a) # mapM :: Monad m => (a -> m b) -> U1 * a -> m (U1 * b) # sequence :: Monad m => U1 * (m a) -> m (U1 * a) #
MonadPlus (U1 *) # | Since: 4.9.0.0
Methods mzero :: U1 * a # mplus :: U1 * a -> U1 * a -> U1 * a #
Alternative (U1 *) # | Since: 4.9.0.0
Methods empty :: U1 * a # (<|>) :: U1 * a -> U1 * a -> U1 * a # some :: U1 * a -> U1 * [a] # many :: U1 * a -> U1 * [a] #
MonadZip (U1 *) # | Since: 4.9.0.0
Methods mzip :: U1 * a -> U1 * b -> U1 * (a, b) # mzipWith :: (a -> b -> c) -> U1 * a -> U1 * b -> U1 * c # munzip :: U1 * (a, b) -> (U1 * a, U1 * b) #
Eq (U1 k p) # | Since: 4.9.0.0
Methods (==) :: U1 k p -> U1 k p -> Bool Source # (/=) :: U1 k p -> U1 k p -> Bool Source #
Data p => Data (U1 * p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> U1 * p -> c (U1 * p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (U1 * p) #

toConstr :: U1 * p -> Constr #

dataTypeOf :: U1 * p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (U1 * p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (U1 * p)) #

gmapT :: (forall b. Data b => b -> b) -> U1 * p -> U1 * p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> U1 * p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> U1 * p -> r #

gmapQ :: (forall d. Data d => d -> u) -> U1 * p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> U1 * p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> U1 * p -> m (U1 * p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> U1 * p -> m (U1 * p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> U1 * p -> m (U1 * p) #

Ord (U1 k p) # | Since: 4.9.0.0
Methods compare :: U1 k p -> U1 k p -> Ordering Source # (<) :: U1 k p -> U1 k p -> Bool Source # (<=) :: U1 k p -> U1 k p -> Bool Source # (>) :: U1 k p -> U1 k p -> Bool Source # (>=) :: U1 k p -> U1 k p -> Bool Source # max :: U1 k p -> U1 k p -> U1 k p Source # min :: U1 k p -> U1 k p -> U1 k p Source #
Read (U1 k p) # | Since: 4.9.0.0
Methods readsPrec :: Int -> ReadS (U1 k p) # readList :: ReadS [U1 k p] # readPrec :: ReadPrec (U1 k p) # readListPrec :: ReadPrec [U1 k p] #
Show (U1 k p) # | Since: 4.9.0.0
Methods showsPrec :: Int -> U1 k p -> ShowS # show :: U1 k p -> String # showList :: [U1 k p] -> ShowS #
Generic (U1 k p) # |
Associated Types type Rep (U1 k p) :: * -> * # Methods from :: U1 k p -> Rep (U1 k p) x # to :: Rep (U1 k p) x -> U1 k p #
type Rep1 k (U1 k) # |
type Rep1 k (U1 k) = D1 k (MetaData "U1" "GHC.Generics" "base" False) (C1 k (MetaCons "U1" PrefixI False) (U1 k))
type Rep (U1 k p) # |
type Rep (U1 k p) = D1 * (MetaData "U1" "GHC.Generics" "base" False) (C1 * (MetaCons "U1" PrefixI False) (U1 *))

newtype Par1 p #

Used for marking occurrences of the parameter

Constructors

Par1 |

Fields

- unPar1 :: p

Instances

Monad Par1 # | Since: 4.9.0.0
Methods (>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b # (>>) :: Par1 a -> Par1 b -> Par1 b # return :: a -> Par1 a # fail :: String -> Par1 a #
Functor Par1 # |
Methods fmap :: (a -> b) -> Par1 a -> Par1 b # (<$) :: a -> Par1 b -> Par1 a #
MonadFix Par1 # | Since: 4.9.0.0
Methods mfix :: (a -> Par1 a) -> Par1 a #
Applicative Par1 # | Since: 4.9.0.0
Methods pure :: a -> Par1 a # (<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b # liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c # (*>) :: Par1 a -> Par1 b -> Par1 b # (<*) :: Par1 a -> Par1 b -> Par1 a #
Foldable Par1 # |

Methods

fold :: Monoid m => Par1 m -> m #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m #

foldr :: (a -> b -> b) -> b -> Par1 a -> b #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b #

foldl :: (b -> a -> b) -> b -> Par1 a -> b #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b #

foldr1 :: (a -> a -> a) -> Par1 a -> a #

foldl1 :: (a -> a -> a) -> Par1 a -> a #

toList :: Par1 a -> [a] #

null :: Par1 a -> Bool #

length :: Par1 a -> Int #

elem :: Eq a => a -> Par1 a -> Bool #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

sum :: Num a => Par1 a -> a #

product :: Num a => Par1 a -> a #

Traversable Par1 # |
Methods traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) # sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) # mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) # sequence :: Monad m => Par1 (m a) -> m (Par1 a) #
MonadZip Par1 # | Since: 4.9.0.0
Methods mzip :: Par1 a -> Par1 b -> Par1 (a, b) # mzipWith :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c # munzip :: Par1 (a, b) -> (Par1 a, Par1 b) #
Eq p => Eq (Par1 p) # |
Methods (==) :: Par1 p -> Par1 p -> Bool Source # (/=) :: Par1 p -> Par1 p -> Bool Source #
Data p => Data (Par1 p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Par1 p -> c (Par1 p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Par1 p) #

toConstr :: Par1 p -> Constr #

dataTypeOf :: Par1 p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Par1 p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Par1 p)) #

gmapT :: (forall b. Data b => b -> b) -> Par1 p -> Par1 p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Par1 p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Par1 p -> r #

gmapQ :: (forall d. Data d => d -> u) -> Par1 p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Par1 p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

Ord p => Ord (Par1 p) # |
Methods compare :: Par1 p -> Par1 p -> Ordering Source # (<) :: Par1 p -> Par1 p -> Bool Source # (<=) :: Par1 p -> Par1 p -> Bool Source # (>) :: Par1 p -> Par1 p -> Bool Source # (>=) :: Par1 p -> Par1 p -> Bool Source # max :: Par1 p -> Par1 p -> Par1 p Source # min :: Par1 p -> Par1 p -> Par1 p Source #
Read p => Read (Par1 p) # |
Methods readsPrec :: Int -> ReadS (Par1 p) # readList :: ReadS [Par1 p] # readPrec :: ReadPrec (Par1 p) # readListPrec :: ReadPrec [Par1 p] #
Show p => Show (Par1 p) # |
Methods showsPrec :: Int -> Par1 p -> ShowS # show :: Par1 p -> String # showList :: [Par1 p] -> ShowS #
Generic (Par1 p) # |
Associated Types type Rep (Par1 p) :: * -> * # Methods from :: Par1 p -> Rep (Par1 p) x # to :: Rep (Par1 p) x -> Par1 p #
Generic1 * Par1 # |
Associated Types type Rep1 Par1 (f :: Par1 -> *) :: k -> * # Methods from1 :: f a -> Rep1 Par1 f a # to1 :: Rep1 Par1 f a -> f a #
type Rep (Par1 p) # |
type Rep (Par1 p) = D1 * (MetaData "Par1" "GHC.Generics" "base" True) (C1 * (MetaCons "Par1" PrefixI True) (S1 * (MetaSel (Just Symbol "unPar1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * p)))
type Rep1 * Par1 # |
type Rep1 * Par1 = D1 * (MetaData "Par1" "GHC.Generics" "base" True) (C1 * (MetaCons "Par1" PrefixI True) (S1 * (MetaSel (Just Symbol "unPar1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

newtype Rec1 (f :: k -> *) (p :: k) #

Recursive calls of kind `* -> *` (or kind `k -> *`, when `PolyKinds` is enabled)

Constructors

Rec1 |

Fields

- unRec1 :: f p

Instances

Generic1 k (Rec1 k f) # |
Associated Types type Rep1 (Rec1 k f) (f :: Rec1 k f -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Rec1 k f) f a # to1 :: Rep1 (Rec1 k f) f a -> f a #
Monad f => Monad (Rec1 * f) # | Since: 4.9.0.0
Methods (>>=) :: Rec1 * f a -> (a -> Rec1 * f b) -> Rec1 * f b # (>>) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f b # return :: a -> Rec1 * f a # fail :: String -> Rec1 * f a #
Functor f => Functor (Rec1 * f) # |
Methods fmap :: (a -> b) -> Rec1 * f a -> Rec1 * f b # (<$) :: a -> Rec1 * f b -> Rec1 * f a #
MonadFix f => MonadFix (Rec1 * f) # | Since: 4.9.0.0
Methods mfix :: (a -> Rec1 * f a) -> Rec1 * f a #
Applicative f => Applicative (Rec1 * f) # | Since: 4.9.0.0
Methods pure :: a -> Rec1 * f a # (<*>) :: Rec1 * f (a -> b) -> Rec1 * f a -> Rec1 * f b # liftA2 :: (a -> b -> c) -> Rec1 * f a -> Rec1 * f b -> Rec1 * f c # (*>) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f b # (<*) :: Rec1 * f a -> Rec1 * f b -> Rec1 * f a #
Foldable f => Foldable (Rec1 * f) # |

Methods

fold :: Monoid m => Rec1 * f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 * f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 * f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 * f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 * f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 * f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 * f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 * f a -> a #

toList :: Rec1 * f a -> [a] #

null :: Rec1 * f a -> Bool #

length :: Rec1 * f a -> Int #

elem :: Eq a => a -> Rec1 * f a -> Bool #

maximum :: Ord a => Rec1 * f a -> a #

minimum :: Ord a => Rec1 * f a -> a #

sum :: Num a => Rec1 * f a -> a #

product :: Num a => Rec1 * f a -> a #

Traversable f => Traversable (Rec1 * f) # |
Methods traverse :: Applicative f => (a -> f b) -> Rec1 * f a -> f (Rec1 * f b) # sequenceA :: Applicative f => Rec1 * f (f a) -> f (Rec1 * f a) # mapM :: Monad m => (a -> m b) -> Rec1 * f a -> m (Rec1 * f b) # sequence :: Monad m => Rec1 * f (m a) -> m (Rec1 * f a) #
MonadPlus f => MonadPlus (Rec1 * f) # | Since: 4.9.0.0
Methods mzero :: Rec1 * f a # mplus :: Rec1 * f a -> Rec1 * f a -> Rec1 * f a #
Alternative f => Alternative (Rec1 * f) # | Since: 4.9.0.0
Methods empty :: Rec1 * f a # (<|>) :: Rec1 * f a -> Rec1 * f a -> Rec1 * f a # some :: Rec1 * f a -> Rec1 * f [a] # many :: Rec1 * f a -> Rec1 * f [a] #
MonadZip f => MonadZip (Rec1 * f) # | Since: 4.9.0.0
Methods mzip :: Rec1 * f a -> Rec1 * f b -> Rec1 * f (a, b) # mzipWith :: (a -> b -> c) -> Rec1 * f a -> Rec1 * f b -> Rec1 * f c # munzip :: Rec1 * f (a, b) -> (Rec1 * f a, Rec1 * f b) #
Eq (f p) => Eq (Rec1 k f p) # |
Methods (==) :: Rec1 k f p -> Rec1 k f p -> Bool Source # (/=) :: Rec1 k f p -> Rec1 k f p -> Bool Source #
(Data (f p), Typeable (* -> *) f, Data p) => Data (Rec1 * f p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rec1 * f p -> c (Rec1 * f p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Rec1 * f p) #

toConstr :: Rec1 * f p -> Constr #

dataTypeOf :: Rec1 * f p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Rec1 * f p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Rec1 * f p)) #

gmapT :: (forall b. Data b => b -> b) -> Rec1 * f p -> Rec1 * f p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rec1 * f p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rec1 * f p -> r #

gmapQ :: (forall d. Data d => d -> u) -> Rec1 * f p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Rec1 * f p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rec1 * f p -> m (Rec1 * f p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rec1 * f p -> m (Rec1 * f p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rec1 * f p -> m (Rec1 * f p) #

Ord (f p) => Ord (Rec1 k f p) # |
Methods compare :: Rec1 k f p -> Rec1 k f p -> Ordering Source # (<) :: Rec1 k f p -> Rec1 k f p -> Bool Source # (<=) :: Rec1 k f p -> Rec1 k f p -> Bool Source # (>) :: Rec1 k f p -> Rec1 k f p -> Bool Source # (>=) :: Rec1 k f p -> Rec1 k f p -> Bool Source # max :: Rec1 k f p -> Rec1 k f p -> Rec1 k f p Source # min :: Rec1 k f p -> Rec1 k f p -> Rec1 k f p Source #
Read (f p) => Read (Rec1 k f p) # |
Methods readsPrec :: Int -> ReadS (Rec1 k f p) # readList :: ReadS [Rec1 k f p] # readPrec :: ReadPrec (Rec1 k f p) # readListPrec :: ReadPrec [Rec1 k f p] #
Show (f p) => Show (Rec1 k f p) # |
Methods showsPrec :: Int -> Rec1 k f p -> ShowS # show :: Rec1 k f p -> String # showList :: [Rec1 k f p] -> ShowS #
Generic (Rec1 k f p) # |
Associated Types type Rep (Rec1 k f p) :: * -> * # Methods from :: Rec1 k f p -> Rep (Rec1 k f p) x # to :: Rep (Rec1 k f p) x -> Rec1 k f p #
type Rep1 k (Rec1 k f) # |
type Rep1 k (Rec1 k f) = D1 k (MetaData "Rec1" "GHC.Generics" "base" True) (C1 k (MetaCons "Rec1" PrefixI True) (S1 k (MetaSel (Just Symbol "unRec1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k f)))
type Rep (Rec1 k f p) # |
type Rep (Rec1 k f p) = D1 * (MetaData "Rec1" "GHC.Generics" "base" True) (C1 * (MetaCons "Rec1" PrefixI True) (S1 * (MetaSel (Just Symbol "unRec1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f p))))

newtype K1 (i :: *) c (p :: k) #

Constants, additional parameters and recursion of kind `*`

Constructors

K1 |

Fields

- unK1 :: c

Instances

Generic1 k (K1 k i c) # |
Associated Types type Rep1 (K1 k i c) (f :: K1 k i c -> *) :: k -> * # Methods from1 :: f a -> Rep1 (K1 k i c) f a # to1 :: Rep1 (K1 k i c) f a -> f a #
Bifunctor (K1 * i) # | Since: 4.9.0.0
Methods bimap :: (a -> b) -> (c -> d) -> K1 * i a c -> K1 * i b d # first :: (a -> b) -> K1 * i a c -> K1 * i b c # second :: (b -> c) -> K1 * i a b -> K1 * i a c #
Bifoldable (K1 * i) # | Since: 4.10.0.0
Methods bifold :: Monoid m => K1 * i m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> K1 * i a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> K1 * i a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> K1 * i a b -> c #
Bitraversable (K1 * i) # | Since: 4.10.0.0
Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> K1 * i a b -> f (K1 * i c d) #
Functor (K1 * i c) # |
Methods fmap :: (a -> b) -> K1 * i c a -> K1 * i c b # (<$) :: a -> K1 * i c b -> K1 * i c a #
Foldable (K1 * i c) # |

Methods

fold :: Monoid m => K1 * i c m -> m #

foldMap :: Monoid m => (a -> m) -> K1 * i c a -> m #

foldr :: (a -> b -> b) -> b -> K1 * i c a -> b #

foldr' :: (a -> b -> b) -> b -> K1 * i c a -> b #

foldl :: (b -> a -> b) -> b -> K1 * i c a -> b #

foldl' :: (b -> a -> b) -> b -> K1 * i c a -> b #

foldr1 :: (a -> a -> a) -> K1 * i c a -> a #

foldl1 :: (a -> a -> a) -> K1 * i c a -> a #

toList :: K1 * i c a -> [a] #

null :: K1 * i c a -> Bool #

length :: K1 * i c a -> Int #

elem :: Eq a => a -> K1 * i c a -> Bool #

maximum :: Ord a => K1 * i c a -> a #

minimum :: Ord a => K1 * i c a -> a #

sum :: Num a => K1 * i c a -> a #

product :: Num a => K1 * i c a -> a #

Traversable (K1 * i c) # |
Methods traverse :: Applicative f => (a -> f b) -> K1 * i c a -> f (K1 * i c b) # sequenceA :: Applicative f => K1 * i c (f a) -> f (K1 * i c a) # mapM :: Monad m => (a -> m b) -> K1 * i c a -> m (K1 * i c b) # sequence :: Monad m => K1 * i c (m a) -> m (K1 * i c a) #
Eq c => Eq (K1 k i c p) # |
Methods (==) :: K1 k i c p -> K1 k i c p -> Bool Source # (/=) :: K1 k i c p -> K1 k i c p -> Bool Source #
(Typeable * i, Data p, Data c) => Data (K1 * i c p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> K1 * i c p -> c (K1 * i c p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (K1 * i c p) #

toConstr :: K1 * i c p -> Constr #

dataTypeOf :: K1 * i c p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (K1 * i c p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (K1 * i c p)) #

gmapT :: (forall b. Data b => b -> b) -> K1 * i c p -> K1 * i c p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> K1 * i c p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> K1 * i c p -> r #

gmapQ :: (forall d. Data d => d -> u) -> K1 * i c p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> K1 * i c p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> K1 * i c p -> m (K1 * i c p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> K1 * i c p -> m (K1 * i c p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> K1 * i c p -> m (K1 * i c p) #

Ord c => Ord (K1 k i c p) # |
Methods compare :: K1 k i c p -> K1 k i c p -> Ordering Source # (<) :: K1 k i c p -> K1 k i c p -> Bool Source # (<=) :: K1 k i c p -> K1 k i c p -> Bool Source # (>) :: K1 k i c p -> K1 k i c p -> Bool Source # (>=) :: K1 k i c p -> K1 k i c p -> Bool Source # max :: K1 k i c p -> K1 k i c p -> K1 k i c p Source # min :: K1 k i c p -> K1 k i c p -> K1 k i c p Source #
Read c => Read (K1 k i c p) # |
Methods readsPrec :: Int -> ReadS (K1 k i c p) # readList :: ReadS [K1 k i c p] # readPrec :: ReadPrec (K1 k i c p) # readListPrec :: ReadPrec [K1 k i c p] #
Show c => Show (K1 k i c p) # |
Methods showsPrec :: Int -> K1 k i c p -> ShowS # show :: K1 k i c p -> String # showList :: [K1 k i c p] -> ShowS #
Generic (K1 k i c p) # |
Associated Types type Rep (K1 k i c p) :: * -> * # Methods from :: K1 k i c p -> Rep (K1 k i c p) x # to :: Rep (K1 k i c p) x -> K1 k i c p #
type Rep1 k (K1 k i c) # |
type Rep1 k (K1 k i c) = D1 k (MetaData "K1" "GHC.Generics" "base" True) (C1 k (MetaCons "K1" PrefixI True) (S1 k (MetaSel (Just Symbol "unK1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 k c)))
type Rep (K1 k i c p) # |
type Rep (K1 k i c p) = D1 * (MetaData "K1" "GHC.Generics" "base" True) (C1 * (MetaCons "K1" PrefixI True) (S1 * (MetaSel (Just Symbol "unK1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * c)))

newtype M1 (i :: *) (c :: Meta) (f :: k -> *) (p :: k) #

Meta-information (constructor names, etc.)

Constructors

M1 |

Fields

- unM1 :: f p

Instances

Generic1 k (M1 k i c f) # |
Associated Types type Rep1 (M1 k i c f) (f :: M1 k i c f -> *) :: k -> * # Methods from1 :: f a -> Rep1 (M1 k i c f) f a # to1 :: Rep1 (M1 k i c f) f a -> f a #
Monad f => Monad (M1 * i c f) # | Since: 4.9.0.0
Methods (>>=) :: M1 * i c f a -> (a -> M1 * i c f b) -> M1 * i c f b # (>>) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f b # return :: a -> M1 * i c f a # fail :: String -> M1 * i c f a #
Functor f => Functor (M1 * i c f) # |
Methods fmap :: (a -> b) -> M1 * i c f a -> M1 * i c f b # (<$) :: a -> M1 * i c f b -> M1 * i c f a #
MonadFix f => MonadFix (M1 * i c f) # | Since: 4.9.0.0
Methods mfix :: (a -> M1 * i c f a) -> M1 * i c f a #
Applicative f => Applicative (M1 * i c f) # | Since: 4.9.0.0
Methods pure :: a -> M1 * i c f a # (<*>) :: M1 * i c f (a -> b) -> M1 * i c f a -> M1 * i c f b # liftA2 :: (a -> b -> c) -> M1 * i c f a -> M1 * i c f b -> M1 * i c f c # (*>) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f b # (<*) :: M1 * i c f a -> M1 * i c f b -> M1 * i c f a #
Foldable f => Foldable (M1 * i c f) # |

Methods

fold :: Monoid m => M1 * i c f m -> m #

foldMap :: Monoid m => (a -> m) -> M1 * i c f a -> m #

foldr :: (a -> b -> b) -> b -> M1 * i c f a -> b #

foldr' :: (a -> b -> b) -> b -> M1 * i c f a -> b #

foldl :: (b -> a -> b) -> b -> M1 * i c f a -> b #

foldl' :: (b -> a -> b) -> b -> M1 * i c f a -> b #

foldr1 :: (a -> a -> a) -> M1 * i c f a -> a #

foldl1 :: (a -> a -> a) -> M1 * i c f a -> a #

toList :: M1 * i c f a -> [a] #

null :: M1 * i c f a -> Bool #

length :: M1 * i c f a -> Int #

elem :: Eq a => a -> M1 * i c f a -> Bool #

maximum :: Ord a => M1 * i c f a -> a #

minimum :: Ord a => M1 * i c f a -> a #

sum :: Num a => M1 * i c f a -> a #

product :: Num a => M1 * i c f a -> a #

Traversable f => Traversable (M1 * i c f) # |
Methods traverse :: Applicative f => (a -> f b) -> M1 * i c f a -> f (M1 * i c f b) # sequenceA :: Applicative f => M1 * i c f (f a) -> f (M1 * i c f a) # mapM :: Monad m => (a -> m b) -> M1 * i c f a -> m (M1 * i c f b) # sequence :: Monad m => M1 * i c f (m a) -> m (M1 * i c f a) #
MonadPlus f => MonadPlus (M1 * i c f) # | Since: 4.9.0.0
Methods mzero :: M1 * i c f a # mplus :: M1 * i c f a -> M1 * i c f a -> M1 * i c f a #
Alternative f => Alternative (M1 * i c f) # | Since: 4.9.0.0
Methods empty :: M1 * i c f a # (<|>) :: M1 * i c f a -> M1 * i c f a -> M1 * i c f a # some :: M1 * i c f a -> M1 * i c f [a] # many :: M1 * i c f a -> M1 * i c f [a] #
MonadZip f => MonadZip (M1 * i c f) # | Since: 4.9.0.0
Methods mzip :: M1 * i c f a -> M1 * i c f b -> M1 * i c f (a, b) # mzipWith :: (a -> b -> c) -> M1 * i c f a -> M1 * i c f b -> M1 * i c f c # munzip :: M1 * i c f (a, b) -> (M1 * i c f a, M1 * i c f b) #
Eq (f p) => Eq (M1 k i c f p) # |
Methods (==) :: M1 k i c f p -> M1 k i c f p -> Bool Source # (/=) :: M1 k i c f p -> M1 k i c f p -> Bool Source #
(Data p, Data (f p), Typeable Meta c, Typeable * i, Typeable (* -> *) f) => Data (M1 * i c f p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> M1 * i c f p -> c (M1 * i c f p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (M1 * i c f p) #

toConstr :: M1 * i c f p -> Constr #

dataTypeOf :: M1 * i c f p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (M1 * i c f p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (M1 * i c f p)) #

gmapT :: (forall b. Data b => b -> b) -> M1 * i c f p -> M1 * i c f p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> M1 * i c f p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> M1 * i c f p -> r #

gmapQ :: (forall d. Data d => d -> u) -> M1 * i c f p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> M1 * i c f p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> M1 * i c f p -> m (M1 * i c f p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> M1 * i c f p -> m (M1 * i c f p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> M1 * i c f p -> m (M1 * i c f p) #

Ord (f p) => Ord (M1 k i c f p) # |

Methods

compare :: M1 k i c f p -> M1 k i c f p -> Ordering Source #

(<) :: M1 k i c f p -> M1 k i c f p -> Bool Source #

(<=) :: M1 k i c f p -> M1 k i c f p -> Bool Source #

(>) :: M1 k i c f p -> M1 k i c f p -> Bool Source #

(>=) :: M1 k i c f p -> M1 k i c f p -> Bool Source #

max :: M1 k i c f p -> M1 k i c f p -> M1 k i c f p Source #

min :: M1 k i c f p -> M1 k i c f p -> M1 k i c f p Source #

Read (f p) => Read (M1 k i c f p) # |
Methods readsPrec :: Int -> ReadS (M1 k i c f p) # readList :: ReadS [M1 k i c f p] # readPrec :: ReadPrec (M1 k i c f p) # readListPrec :: ReadPrec [M1 k i c f p] #
Show (f p) => Show (M1 k i c f p) # |
Methods showsPrec :: Int -> M1 k i c f p -> ShowS # show :: M1 k i c f p -> String # showList :: [M1 k i c f p] -> ShowS #
Generic (M1 k i c f p) # |
Associated Types type Rep (M1 k i c f p) :: * -> * # Methods from :: M1 k i c f p -> Rep (M1 k i c f p) x # to :: Rep (M1 k i c f p) x -> M1 k i c f p #
type Rep1 k (M1 k i c f) # |
type Rep1 k (M1 k i c f) = D1 k (MetaData "M1" "GHC.Generics" "base" True) (C1 k (MetaCons "M1" PrefixI True) (S1 k (MetaSel (Just Symbol "unM1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k f)))
type Rep (M1 k i c f p) # |
type Rep (M1 k i c f p) = D1 * (MetaData "M1" "GHC.Generics" "base" True) (C1 * (MetaCons "M1" PrefixI True) (S1 * (MetaSel (Just Symbol "unM1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f p))))

data ((f :: k -> *) :+: (g :: k -> *)) (p :: k) infixr 5 #

Sums: encode choice between constructors

Constructors

L1 (f p) |
R1 (g p) |

Instances

Generic1 k ((:+:) k f g) # |
Associated Types type Rep1 ((k :+: f) g) (f :: (k :+: f) g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((k :+: f) g) f a # to1 :: Rep1 ((k :+: f) g) f a -> f a #
(Functor g, Functor f) => Functor ((:+:) * f g) # |
Methods fmap :: (a -> b) -> (* :+: f) g a -> (* :+: f) g b # (<$) :: a -> (* :+: f) g b -> (* :+: f) g a #
(Foldable f, Foldable g) => Foldable ((:+:) * f g) # |

Methods

fold :: Monoid m => (* :+: f) g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :+: f) g a -> m #

foldr :: (a -> b -> b) -> b -> (* :+: f) g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :+: f) g a -> b #

foldl :: (b -> a -> b) -> b -> (* :+: f) g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :+: f) g a -> b #

foldr1 :: (a -> a -> a) -> (* :+: f) g a -> a #

foldl1 :: (a -> a -> a) -> (* :+: f) g a -> a #

toList :: (* :+: f) g a -> [a] #

null :: (* :+: f) g a -> Bool #

length :: (* :+: f) g a -> Int #

elem :: Eq a => a -> (* :+: f) g a -> Bool #

maximum :: Ord a => (* :+: f) g a -> a #

minimum :: Ord a => (* :+: f) g a -> a #

sum :: Num a => (* :+: f) g a -> a #

product :: Num a => (* :+: f) g a -> a #

(Traversable f, Traversable g) => Traversable ((:+:) * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :+: f) g a -> f ((* :+: f) g b) # sequenceA :: Applicative f => (* :+: f) g (f a) -> f ((* :+: f) g a) # mapM :: Monad m => (a -> m b) -> (* :+: f) g a -> m ((* :+: f) g b) # sequence :: Monad m => (* :+: f) g (m a) -> m ((* :+: f) g a) #
(Eq (g p), Eq (f p)) => Eq ((:+:) k f g p) # |
Methods (==) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source # (/=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source #
(Typeable (* -> *) f, Typeable (* -> *) g, Data p, Data (f p), Data (g p)) => Data ((:+:) * f g p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall a. a -> c a) -> (* :+: f) g p -> c ((* :+: f) g p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((* :+: f) g p) #

toConstr :: (* :+: f) g p -> Constr #

dataTypeOf :: (* :+: f) g p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ((* :+: f) g p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((* :+: f) g p)) #

gmapT :: (forall b. Data b => b -> b) -> (* :+: f) g p -> (* :+: f) g p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (* :+: f) g p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (* :+: f) g p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (* :+: f) g p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (* :+: f) g p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (* :+: f) g p -> m ((* :+: f) g p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :+: f) g p -> m ((* :+: f) g p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :+: f) g p -> m ((* :+: f) g p) #

(Ord (g p), Ord (f p)) => Ord ((:+:) k f g p) # |

Methods

compare :: (k :+: f) g p -> (k :+: f) g p -> Ordering Source #

(<) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source #

(<=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source #

(>) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source #

(>=) :: (k :+: f) g p -> (k :+: f) g p -> Bool Source #

max :: (k :+: f) g p -> (k :+: f) g p -> (k :+: f) g p Source #

min :: (k :+: f) g p -> (k :+: f) g p -> (k :+: f) g p Source #

(Read (g p), Read (f p)) => Read ((:+:) k f g p) # |
Methods readsPrec :: Int -> ReadS ((k :+: f) g p) # readList :: ReadS [(k :+: f) g p] # readPrec :: ReadPrec ((k :+: f) g p) # readListPrec :: ReadPrec [(k :+: f) g p] #
(Show (g p), Show (f p)) => Show ((:+:) k f g p) # |
Methods showsPrec :: Int -> (k :+: f) g p -> ShowS # show :: (k :+: f) g p -> String # showList :: [(k :+: f) g p] -> ShowS #
Generic ((:+:) k f g p) # |
Associated Types type Rep ((k :+: f) g p) :: * -> * # Methods from :: (k :+: f) g p -> Rep ((k :+: f) g p) x # to :: Rep ((k :+: f) g p) x -> (k :+: f) g p #
type Rep1 k ((:+:) k f g) # |
type Rep1 k ((:+:) k f g) = D1 k (MetaData ":+:" "GHC.Generics" "base" False) ((:+:) k (C1 k (MetaCons "L1" PrefixI False) (S1 k (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k f))) (C1 k (MetaCons "R1" PrefixI False) (S1 k (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k g))))
type Rep ((:+:) k f g p) # |
type Rep ((:+:) k f g p) = D1 * (MetaData ":+:" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "L1" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f p)))) (C1 * (MetaCons "R1" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (g p)))))

data ((f :: k -> *) :*: (g :: k -> *)) (p :: k) infixr 6 #

Products: encode multiple arguments to constructors

Constructors

(f p) :*: (g p) infixr 6 |

Instances

Generic1 k ((:*:) k f g) # |
Associated Types type Rep1 ((k :*: f) g) (f :: (k :*: f) g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((k :*: f) g) f a # to1 :: Rep1 ((k :*: f) g) f a -> f a #
(Monad f, Monad g) => Monad ((:*:) * f g) # | Since: 4.9.0.0
Methods (>>=) :: (* :*: f) g a -> (a -> (* :*: f) g b) -> (* :*: f) g b # (>>) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g b # return :: a -> (* :*: f) g a # fail :: String -> (* :*: f) g a #
(Functor g, Functor f) => Functor ((:*:) * f g) # |
Methods fmap :: (a -> b) -> (* :*: f) g a -> (* :*: f) g b # (<$) :: a -> (* :*: f) g b -> (* :*: f) g a #
(MonadFix f, MonadFix g) => MonadFix ((:*:) * f g) # | Since: 4.9.0.0
Methods mfix :: (a -> (* :*: f) g a) -> (* :*: f) g a #
(Applicative f, Applicative g) => Applicative ((:*:) * f g) # | Since: 4.9.0.0
Methods pure :: a -> (* :*: f) g a # (<*>) :: (* :*: f) g (a -> b) -> (* :*: f) g a -> (* :*: f) g b # liftA2 :: (a -> b -> c) -> (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g c # (*>) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g b # (<*) :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g a #
(Foldable f, Foldable g) => Foldable ((:*:) * f g) # |

Methods

fold :: Monoid m => (* :*: f) g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :*: f) g a -> m #

foldr :: (a -> b -> b) -> b -> (* :*: f) g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :*: f) g a -> b #

foldl :: (b -> a -> b) -> b -> (* :*: f) g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :*: f) g a -> b #

foldr1 :: (a -> a -> a) -> (* :*: f) g a -> a #

foldl1 :: (a -> a -> a) -> (* :*: f) g a -> a #

toList :: (* :*: f) g a -> [a] #

null :: (* :*: f) g a -> Bool #

length :: (* :*: f) g a -> Int #

elem :: Eq a => a -> (* :*: f) g a -> Bool #

maximum :: Ord a => (* :*: f) g a -> a #

minimum :: Ord a => (* :*: f) g a -> a #

sum :: Num a => (* :*: f) g a -> a #

product :: Num a => (* :*: f) g a -> a #

(Traversable f, Traversable g) => Traversable ((:*:) * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :*: f) g a -> f ((* :*: f) g b) # sequenceA :: Applicative f => (* :*: f) g (f a) -> f ((* :*: f) g a) # mapM :: Monad m => (a -> m b) -> (* :*: f) g a -> m ((* :*: f) g b) # sequence :: Monad m => (* :*: f) g (m a) -> m ((* :*: f) g a) #
(MonadPlus f, MonadPlus g) => MonadPlus ((:*:) * f g) # | Since: 4.9.0.0
Methods mzero :: (* :*: f) g a # mplus :: (* :*: f) g a -> (* :*: f) g a -> (* :*: f) g a #
(Alternative f, Alternative g) => Alternative ((:*:) * f g) # | Since: 4.9.0.0
Methods empty :: (* :*: f) g a # (<|>) :: (* :*: f) g a -> (* :*: f) g a -> (* :*: f) g a # some :: (* :*: f) g a -> (* :*: f) g [a] # many :: (* :*: f) g a -> (* :*: f) g [a] #
(MonadZip f, MonadZip g) => MonadZip ((:*:) * f g) # | Since: 4.9.0.0
Methods mzip :: (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g (a, b) # mzipWith :: (a -> b -> c) -> (* :*: f) g a -> (* :*: f) g b -> (* :*: f) g c # munzip :: (* :*: f) g (a, b) -> ((* :*: f) g a, (* :*: f) g b) #
(Eq (g p), Eq (f p)) => Eq ((:*:) k f g p) # |
Methods (==) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source # (/=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source #
(Typeable (* -> *) f, Typeable (* -> *) g, Data p, Data (f p), Data (g p)) => Data ((:*:) * f g p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall a. a -> c a) -> (* :*: f) g p -> c ((* :*: f) g p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((* :*: f) g p) #

toConstr :: (* :*: f) g p -> Constr #

dataTypeOf :: (* :*: f) g p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ((* :*: f) g p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((* :*: f) g p)) #

gmapT :: (forall b. Data b => b -> b) -> (* :*: f) g p -> (* :*: f) g p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (* :*: f) g p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (* :*: f) g p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (* :*: f) g p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (* :*: f) g p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (* :*: f) g p -> m ((* :*: f) g p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :*: f) g p -> m ((* :*: f) g p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :*: f) g p -> m ((* :*: f) g p) #

(Ord (g p), Ord (f p)) => Ord ((:*:) k f g p) # |

Methods

compare :: (k :*: f) g p -> (k :*: f) g p -> Ordering Source #

(<) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source #

(<=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source #

(>) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source #

(>=) :: (k :*: f) g p -> (k :*: f) g p -> Bool Source #

max :: (k :*: f) g p -> (k :*: f) g p -> (k :*: f) g p Source #

min :: (k :*: f) g p -> (k :*: f) g p -> (k :*: f) g p Source #

(Read (g p), Read (f p)) => Read ((:*:) k f g p) # |
Methods readsPrec :: Int -> ReadS ((k :*: f) g p) # readList :: ReadS [(k :*: f) g p] # readPrec :: ReadPrec ((k :*: f) g p) # readListPrec :: ReadPrec [(k :*: f) g p] #
(Show (g p), Show (f p)) => Show ((:*:) k f g p) # |
Methods showsPrec :: Int -> (k :*: f) g p -> ShowS # show :: (k :*: f) g p -> String # showList :: [(k :*: f) g p] -> ShowS #
Generic ((:*:) k f g p) # |
Associated Types type Rep ((k :*: f) g p) :: * -> * # Methods from :: (k :*: f) g p -> Rep ((k :*: f) g p) x # to :: Rep ((k :*: f) g p) x -> (k :*: f) g p #
type Rep1 k ((:*:) k f g) # |
type Rep1 k ((:*:) k f g) = D1 k (MetaData ":*:" "GHC.Generics" "base" False) (C1 k (MetaCons ":*:" (InfixI RightAssociative 6) False) ((:*:) k (S1 k (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k f)) (S1 k (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 k g))))
type Rep ((:*:) k f g p) # |
type Rep ((:*:) k f g p) = D1 * (MetaData ":*:" "GHC.Generics" "base" False) (C1 * (MetaCons ":*:" (InfixI RightAssociative 6) False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f p))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (g p)))))

newtype ((f :: k2 -> *) :.: (g :: k1 -> k2)) (p :: k1) infixr 7 #

Composition of functors

Constructors

Comp1 |

Fields

- unComp1 :: f (g p)

Instances

Functor f => Generic1 k ((:.:) * k f g) # |
Associated Types type Rep1 ((* :.: k) f g) (f :: (* :.: k) f g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((* :.: k) f g) f a # to1 :: Rep1 ((* :.: k) f g) f a -> f a #
(Functor g, Functor f) => Functor ((:.:) * * f g) # |
Methods fmap :: (a -> b) -> (* :.: *) f g a -> (* :.: *) f g b # (<$) :: a -> (* :.: *) f g b -> (* :.: *) f g a #
(Applicative f, Applicative g) => Applicative ((:.:) * * f g) # | Since: 4.9.0.0
Methods pure :: a -> (* :.: *) f g a # (<*>) :: (* :.: *) f g (a -> b) -> (* :.: *) f g a -> (* :.: *) f g b # liftA2 :: (a -> b -> c) -> (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g c # (*>) :: (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g b # (<*) :: (* :.: *) f g a -> (* :.: *) f g b -> (* :.: *) f g a #
(Foldable f, Foldable g) => Foldable ((:.:) * * f g) # |

Methods

fold :: Monoid m => (* :.: *) f g m -> m #

foldMap :: Monoid m => (a -> m) -> (* :.: *) f g a -> m #

foldr :: (a -> b -> b) -> b -> (* :.: *) f g a -> b #

foldr' :: (a -> b -> b) -> b -> (* :.: *) f g a -> b #

foldl :: (b -> a -> b) -> b -> (* :.: *) f g a -> b #

foldl' :: (b -> a -> b) -> b -> (* :.: *) f g a -> b #

foldr1 :: (a -> a -> a) -> (* :.: *) f g a -> a #

foldl1 :: (a -> a -> a) -> (* :.: *) f g a -> a #

toList :: (* :.: *) f g a -> [a] #

null :: (* :.: *) f g a -> Bool #

length :: (* :.: *) f g a -> Int #

elem :: Eq a => a -> (* :.: *) f g a -> Bool #

maximum :: Ord a => (* :.: *) f g a -> a #

minimum :: Ord a => (* :.: *) f g a -> a #

sum :: Num a => (* :.: *) f g a -> a #

product :: Num a => (* :.: *) f g a -> a #

(Traversable f, Traversable g) => Traversable ((:.:) * * f g) # |
Methods traverse :: Applicative f => (a -> f b) -> (* :.: *) f g a -> f ((* :.: *) f g b) # sequenceA :: Applicative f => (* :.: *) f g (f a) -> f ((* :.: *) f g a) # mapM :: Monad m => (a -> m b) -> (* :.: *) f g a -> m ((* :.: *) f g b) # sequence :: Monad m => (* :.: *) f g (m a) -> m ((* :.: *) f g a) #
(Alternative f, Applicative g) => Alternative ((:.:) * * f g) # | Since: 4.9.0.0
Methods empty :: (* :.: *) f g a # (<|>) :: (* :.: *) f g a -> (* :.: *) f g a -> (* :.: *) f g a # some :: (* :.: *) f g a -> (* :.: *) f g [a] # many :: (* :.: *) f g a -> (* :.: *) f g [a] #
Eq (f (g p)) => Eq ((:.:) k2 k1 f g p) # |
Methods (==) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source # (/=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source #
(Typeable (* -> *) f, Typeable (* -> *) g, Data p, Data (f (g p))) => Data ((:.:) * * f g p) # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall a. a -> c a) -> (* :.: *) f g p -> c ((* :.: *) f g p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((* :.: *) f g p) #

toConstr :: (* :.: *) f g p -> Constr #

dataTypeOf :: (* :.: *) f g p -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ((* :.: *) f g p)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((* :.: *) f g p)) #

gmapT :: (forall b. Data b => b -> b) -> (* :.: *) f g p -> (* :.: *) f g p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (* :.: *) f g p -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (* :.: *) f g p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (* :.: *) f g p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (* :.: *) f g p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (* :.: *) f g p -> m ((* :.: *) f g p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :.: *) f g p -> m ((* :.: *) f g p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :.: *) f g p -> m ((* :.: *) f g p) #

Ord (f (g p)) => Ord ((:.:) k2 k1 f g p) # |

Methods

compare :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Ordering Source #

(<) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source #

(<=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source #

(>) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source #

(>=) :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> Bool Source #

max :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> (k2 :.: k1) f g p Source #

min :: (k2 :.: k1) f g p -> (k2 :.: k1) f g p -> (k2 :.: k1) f g p Source #

Read (f (g p)) => Read ((:.:) k2 k1 f g p) # |
Methods readsPrec :: Int -> ReadS ((k2 :.: k1) f g p) # readList :: ReadS [(k2 :.: k1) f g p] # readPrec :: ReadPrec ((k2 :.: k1) f g p) # readListPrec :: ReadPrec [(k2 :.: k1) f g p] #
Show (f (g p)) => Show ((:.:) k2 k1 f g p) # |
Methods showsPrec :: Int -> (k2 :.: k1) f g p -> ShowS # show :: (k2 :.: k1) f g p -> String # showList :: [(k2 :.: k1) f g p] -> ShowS #
Generic ((:.:) k2 k1 f g p) # |
Associated Types type Rep ((k2 :.: k1) f g p) :: * -> * # Methods from :: (k2 :.: k1) f g p -> Rep ((k2 :.: k1) f g p) x # to :: Rep ((k2 :.: k1) f g p) x -> (k2 :.: k1) f g p #
type Rep1 k ((:.:) * k f g) # |
type Rep1 k ((:.:) * k f g) = D1 k (MetaData ":.:" "GHC.Generics" "base" True) (C1 k (MetaCons "Comp1" PrefixI True) (S1 k (MetaSel (Just Symbol "unComp1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) * k f (Rec1 k g))))
type Rep ((:.:) k2 k1 f g p) # |
type Rep ((:.:) k2 k1 f g p) = D1 * (MetaData ":.:" "GHC.Generics" "base" True) (C1 * (MetaCons "Comp1" PrefixI True) (S1 * (MetaSel (Just Symbol "unComp1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (g p)))))

## Unboxed representation types

data family URec (a :: *) (p :: k) #

Constants of unlifted kinds

Since: 4.9.0.0

Instances

Generic1 k (URec k Word) # |
Associated Types type Rep1 (URec k Word) (f :: URec k Word -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Word) f a # to1 :: Rep1 (URec k Word) f a -> f a #
Generic1 k (URec k Int) # |
Associated Types type Rep1 (URec k Int) (f :: URec k Int -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Int) f a # to1 :: Rep1 (URec k Int) f a -> f a #
Generic1 k (URec k Float) # |
Associated Types type Rep1 (URec k Float) (f :: URec k Float -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Float) f a # to1 :: Rep1 (URec k Float) f a -> f a #
Generic1 k (URec k Double) # |
Associated Types type Rep1 (URec k Double) (f :: URec k Double -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Double) f a # to1 :: Rep1 (URec k Double) f a -> f a #
Generic1 k (URec k Char) # |
Associated Types type Rep1 (URec k Char) (f :: URec k Char -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Char) f a # to1 :: Rep1 (URec k Char) f a -> f a #
Generic1 k (URec k (Ptr ())) # |
Associated Types type Rep1 (URec k (Ptr ())) (f :: URec k (Ptr ()) -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k (Ptr ())) f a # to1 :: Rep1 (URec k (Ptr ())) f a -> f a #
Functor (URec * Char) # |
Methods fmap :: (a -> b) -> URec * Char a -> URec * Char b # (<$) :: a -> URec * Char b -> URec * Char a #
Functor (URec * Double) # |
Methods fmap :: (a -> b) -> URec * Double a -> URec * Double b # (<$) :: a -> URec * Double b -> URec * Double a #
Functor (URec * Float) # |
Methods fmap :: (a -> b) -> URec * Float a -> URec * Float b # (<$) :: a -> URec * Float b -> URec * Float a #
Functor (URec * Int) # |
Methods fmap :: (a -> b) -> URec * Int a -> URec * Int b # (<$) :: a -> URec * Int b -> URec * Int a #
Functor (URec * Word) # |
Methods fmap :: (a -> b) -> URec * Word a -> URec * Word b # (<$) :: a -> URec * Word b -> URec * Word a #
Functor (URec * (Ptr ())) # |
Methods fmap :: (a -> b) -> URec * (Ptr ()) a -> URec * (Ptr ()) b # (<$) :: a -> URec * (Ptr ()) b -> URec * (Ptr ()) a #
Foldable (URec * Char) # |

Methods

fold :: Monoid m => URec * Char m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Char a -> m #

foldr :: (a -> b -> b) -> b -> URec * Char a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Char a -> b #

foldl :: (b -> a -> b) -> b -> URec * Char a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Char a -> b #

foldr1 :: (a -> a -> a) -> URec * Char a -> a #

foldl1 :: (a -> a -> a) -> URec * Char a -> a #

toList :: URec * Char a -> [a] #

null :: URec * Char a -> Bool #

length :: URec * Char a -> Int #

elem :: Eq a => a -> URec * Char a -> Bool #

maximum :: Ord a => URec * Char a -> a #

minimum :: Ord a => URec * Char a -> a #

sum :: Num a => URec * Char a -> a #

product :: Num a => URec * Char a -> a #

Foldable (URec * Double) # |

Methods

fold :: Monoid m => URec * Double m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Double a -> m #

foldr :: (a -> b -> b) -> b -> URec * Double a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Double a -> b #

foldl :: (b -> a -> b) -> b -> URec * Double a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Double a -> b #

foldr1 :: (a -> a -> a) -> URec * Double a -> a #

foldl1 :: (a -> a -> a) -> URec * Double a -> a #

toList :: URec * Double a -> [a] #

null :: URec * Double a -> Bool #

length :: URec * Double a -> Int #

elem :: Eq a => a -> URec * Double a -> Bool #

maximum :: Ord a => URec * Double a -> a #

minimum :: Ord a => URec * Double a -> a #

sum :: Num a => URec * Double a -> a #

product :: Num a => URec * Double a -> a #

Foldable (URec * Float) # |

Methods

fold :: Monoid m => URec * Float m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Float a -> m #

foldr :: (a -> b -> b) -> b -> URec * Float a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Float a -> b #

foldl :: (b -> a -> b) -> b -> URec * Float a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Float a -> b #

foldr1 :: (a -> a -> a) -> URec * Float a -> a #

foldl1 :: (a -> a -> a) -> URec * Float a -> a #

toList :: URec * Float a -> [a] #

null :: URec * Float a -> Bool #

length :: URec * Float a -> Int #

elem :: Eq a => a -> URec * Float a -> Bool #

maximum :: Ord a => URec * Float a -> a #

minimum :: Ord a => URec * Float a -> a #

sum :: Num a => URec * Float a -> a #

product :: Num a => URec * Float a -> a #

Foldable (URec * Int) # |

Methods

fold :: Monoid m => URec * Int m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Int a -> m #

foldr :: (a -> b -> b) -> b -> URec * Int a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Int a -> b #

foldl :: (b -> a -> b) -> b -> URec * Int a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Int a -> b #

foldr1 :: (a -> a -> a) -> URec * Int a -> a #

foldl1 :: (a -> a -> a) -> URec * Int a -> a #

toList :: URec * Int a -> [a] #

null :: URec * Int a -> Bool #

length :: URec * Int a -> Int #

elem :: Eq a => a -> URec * Int a -> Bool #

maximum :: Ord a => URec * Int a -> a #

minimum :: Ord a => URec * Int a -> a #

sum :: Num a => URec * Int a -> a #

product :: Num a => URec * Int a -> a #

Foldable (URec * Word) # |

Methods

fold :: Monoid m => URec * Word m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Word a -> m #

foldr :: (a -> b -> b) -> b -> URec * Word a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Word a -> b #

foldl :: (b -> a -> b) -> b -> URec * Word a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Word a -> b #

foldr1 :: (a -> a -> a) -> URec * Word a -> a #

foldl1 :: (a -> a -> a) -> URec * Word a -> a #

toList :: URec * Word a -> [a] #

null :: URec * Word a -> Bool #

length :: URec * Word a -> Int #

elem :: Eq a => a -> URec * Word a -> Bool #

maximum :: Ord a => URec * Word a -> a #

minimum :: Ord a => URec * Word a -> a #

sum :: Num a => URec * Word a -> a #

product :: Num a => URec * Word a -> a #

Foldable (URec * (Ptr ())) # |

Methods

fold :: Monoid m => URec * (Ptr ()) m -> m #

foldMap :: Monoid m => (a -> m) -> URec * (Ptr ()) a -> m #

foldr :: (a -> b -> b) -> b -> URec * (Ptr ()) a -> b #

foldr' :: (a -> b -> b) -> b -> URec * (Ptr ()) a -> b #

foldl :: (b -> a -> b) -> b -> URec * (Ptr ()) a -> b #

foldl' :: (b -> a -> b) -> b -> URec * (Ptr ()) a -> b #

foldr1 :: (a -> a -> a) -> URec * (Ptr ()) a -> a #

foldl1 :: (a -> a -> a) -> URec * (Ptr ()) a -> a #

toList :: URec * (Ptr ()) a -> [a] #

null :: URec * (Ptr ()) a -> Bool #

length :: URec * (Ptr ()) a -> Int #

elem :: Eq a => a -> URec * (Ptr ()) a -> Bool #

maximum :: Ord a => URec * (Ptr ()) a -> a #

minimum :: Ord a => URec * (Ptr ()) a -> a #

sum :: Num a => URec * (Ptr ()) a -> a #

product :: Num a => URec * (Ptr ()) a -> a #

Traversable (URec * Char) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Char a -> f (URec * Char b) # sequenceA :: Applicative f => URec * Char (f a) -> f (URec * Char a) # mapM :: Monad m => (a -> m b) -> URec * Char a -> m (URec * Char b) # sequence :: Monad m => URec * Char (m a) -> m (URec * Char a) #
Traversable (URec * Double) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Double a -> f (URec * Double b) # sequenceA :: Applicative f => URec * Double (f a) -> f (URec * Double a) # mapM :: Monad m => (a -> m b) -> URec * Double a -> m (URec * Double b) # sequence :: Monad m => URec * Double (m a) -> m (URec * Double a) #
Traversable (URec * Float) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Float a -> f (URec * Float b) # sequenceA :: Applicative f => URec * Float (f a) -> f (URec * Float a) # mapM :: Monad m => (a -> m b) -> URec * Float a -> m (URec * Float b) # sequence :: Monad m => URec * Float (m a) -> m (URec * Float a) #
Traversable (URec * Int) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Int a -> f (URec * Int b) # sequenceA :: Applicative f => URec * Int (f a) -> f (URec * Int a) # mapM :: Monad m => (a -> m b) -> URec * Int a -> m (URec * Int b) # sequence :: Monad m => URec * Int (m a) -> m (URec * Int a) #
Traversable (URec * Word) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * Word a -> f (URec * Word b) # sequenceA :: Applicative f => URec * Word (f a) -> f (URec * Word a) # mapM :: Monad m => (a -> m b) -> URec * Word a -> m (URec * Word b) # sequence :: Monad m => URec * Word (m a) -> m (URec * Word a) #
Traversable (URec * (Ptr ())) # |
Methods traverse :: Applicative f => (a -> f b) -> URec * (Ptr ()) a -> f (URec * (Ptr ()) b) # sequenceA :: Applicative f => URec * (Ptr ()) (f a) -> f (URec * (Ptr ()) a) # mapM :: Monad m => (a -> m b) -> URec * (Ptr ()) a -> m (URec * (Ptr ()) b) # sequence :: Monad m => URec * (Ptr ()) (m a) -> m (URec * (Ptr ()) a) #
Eq (URec k Word p) # |
Methods (==) :: URec k Word p -> URec k Word p -> Bool Source # (/=) :: URec k Word p -> URec k Word p -> Bool Source #
Eq (URec k Int p) # |
Methods (==) :: URec k Int p -> URec k Int p -> Bool Source # (/=) :: URec k Int p -> URec k Int p -> Bool Source #
Eq (URec k Float p) # |
Methods (==) :: URec k Float p -> URec k Float p -> Bool Source # (/=) :: URec k Float p -> URec k Float p -> Bool Source #
Eq (URec k Double p) # |
Methods (==) :: URec k Double p -> URec k Double p -> Bool Source # (/=) :: URec k Double p -> URec k Double p -> Bool Source #
Eq (URec k Char p) # |
Methods (==) :: URec k Char p -> URec k Char p -> Bool Source # (/=) :: URec k Char p -> URec k Char p -> Bool Source #
Eq (URec k (Ptr ()) p) # |
Methods (==) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source # (/=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source #
Ord (URec k Word p) # |

Methods

compare :: URec k Word p -> URec k Word p -> Ordering Source #

(<) :: URec k Word p -> URec k Word p -> Bool Source #

(<=) :: URec k Word p -> URec k Word p -> Bool Source #

(>) :: URec k Word p -> URec k Word p -> Bool Source #

(>=) :: URec k Word p -> URec k Word p -> Bool Source #

max :: URec k Word p -> URec k Word p -> URec k Word p Source #

min :: URec k Word p -> URec k Word p -> URec k Word p Source #

Ord (URec k Int p) # |

Methods

compare :: URec k Int p -> URec k Int p -> Ordering Source #

(<) :: URec k Int p -> URec k Int p -> Bool Source #

(<=) :: URec k Int p -> URec k Int p -> Bool Source #

(>) :: URec k Int p -> URec k Int p -> Bool Source #

(>=) :: URec k Int p -> URec k Int p -> Bool Source #

max :: URec k Int p -> URec k Int p -> URec k Int p Source #

min :: URec k Int p -> URec k Int p -> URec k Int p Source #

Ord (URec k Float p) # |

Methods

compare :: URec k Float p -> URec k Float p -> Ordering Source #

(<) :: URec k Float p -> URec k Float p -> Bool Source #

(<=) :: URec k Float p -> URec k Float p -> Bool Source #

(>) :: URec k Float p -> URec k Float p -> Bool Source #

(>=) :: URec k Float p -> URec k Float p -> Bool Source #

max :: URec k Float p -> URec k Float p -> URec k Float p Source #

min :: URec k Float p -> URec k Float p -> URec k Float p Source #

Ord (URec k Double p) # |

Methods

compare :: URec k Double p -> URec k Double p -> Ordering Source #

(<) :: URec k Double p -> URec k Double p -> Bool Source #

(<=) :: URec k Double p -> URec k Double p -> Bool Source #

(>) :: URec k Double p -> URec k Double p -> Bool Source #

(>=) :: URec k Double p -> URec k Double p -> Bool Source #

max :: URec k Double p -> URec k Double p -> URec k Double p Source #

min :: URec k Double p -> URec k Double p -> URec k Double p Source #

Ord (URec k Char p) # |

Methods

compare :: URec k Char p -> URec k Char p -> Ordering Source #

(<) :: URec k Char p -> URec k Char p -> Bool Source #

(<=) :: URec k Char p -> URec k Char p -> Bool Source #

(>) :: URec k Char p -> URec k Char p -> Bool Source #

(>=) :: URec k Char p -> URec k Char p -> Bool Source #

max :: URec k Char p -> URec k Char p -> URec k Char p Source #

min :: URec k Char p -> URec k Char p -> URec k Char p Source #

Ord (URec k (Ptr ()) p) # |

Methods

compare :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Ordering Source #

(<) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source #

(<=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source #

(>) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source #

(>=) :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> Bool Source #

max :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> URec k (Ptr ()) p Source #

min :: URec k (Ptr ()) p -> URec k (Ptr ()) p -> URec k (Ptr ()) p Source #

Show (URec k Word p) # |
Methods showsPrec :: Int -> URec k Word p -> ShowS # show :: URec k Word p -> String # showList :: [URec k Word p] -> ShowS #
Show (URec k Int p) # |
Methods showsPrec :: Int -> URec k Int p -> ShowS # show :: URec k Int p -> String # showList :: [URec k Int p] -> ShowS #
Show (URec k Float p) # |
Methods showsPrec :: Int -> URec k Float p -> ShowS # show :: URec k Float p -> String # showList :: [URec k Float p] -> ShowS #
Show (URec k Double p) # |
Methods showsPrec :: Int -> URec k Double p -> ShowS # show :: URec k Double p -> String # showList :: [URec k Double p] -> ShowS #
Show (URec k Char p) # |
Methods showsPrec :: Int -> URec k Char p -> ShowS # show :: URec k Char p -> String # showList :: [URec k Char p] -> ShowS #
Generic (URec k Word p) # |
Associated Types type Rep (URec k Word p) :: * -> * # Methods from :: URec k Word p -> Rep (URec k Word p) x # to :: Rep (URec k Word p) x -> URec k Word p #
Generic (URec k Int p) # |
Associated Types type Rep (URec k Int p) :: * -> * # Methods from :: URec k Int p -> Rep (URec k Int p) x # to :: Rep (URec k Int p) x -> URec k Int p #
Generic (URec k Float p) # |
Associated Types type Rep (URec k Float p) :: * -> * # Methods from :: URec k Float p -> Rep (URec k Float p) x # to :: Rep (URec k Float p) x -> URec k Float p #
Generic (URec k Double p) # |
Associated Types type Rep (URec k Double p) :: * -> * # Methods from :: URec k Double p -> Rep (URec k Double p) x # to :: Rep (URec k Double p) x -> URec k Double p #
Generic (URec k Char p) # |
Associated Types type Rep (URec k Char p) :: * -> * # Methods from :: URec k Char p -> Rep (URec k Char p) x # to :: Rep (URec k Char p) x -> URec k Char p #
Generic (URec k (Ptr ()) p) # |
Associated Types type Rep (URec k (Ptr ()) p) :: * -> * # Methods from :: URec k (Ptr ()) p -> Rep (URec k (Ptr ()) p) x # to :: Rep (URec k (Ptr ()) p) x -> URec k (Ptr ()) p #
data URec k Word # | Used for marking occurrences of `Word#` Since: 4.9.0.0

data URec k Word = UWord {

- uWord# :: Word#

}

data URec k Int # | Used for marking occurrences of `Int#` Since: 4.9.0.0

data URec k Int = UInt {

- uInt# :: Int#

}

data URec k Float # | Used for marking occurrences of `Float#` Since: 4.9.0.0

data URec k Float = UFloat {

- uFloat# :: Float#

}

data URec k Double # | Used for marking occurrences of `Double#` Since: 4.9.0.0

data URec k Double = UDouble {

- uDouble# :: Double#

}

data URec k Char # | Used for marking occurrences of `Char#` Since: 4.9.0.0

data URec k Char = UChar {

- uChar# :: Char#

}

data URec k (Ptr ()) # | Used for marking occurrences of `Addr#` Since: 4.9.0.0

data URec k (Ptr ()) = UAddr {

- uAddr# :: Addr#

}

type Rep1 k (URec k Word) # |
type Rep1 k (URec k Word) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UWord" PrefixI True) (S1 k (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord k)))
type Rep1 k (URec k Int) # |
type Rep1 k (URec k Int) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UInt" PrefixI True) (S1 k (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt k)))
type Rep1 k (URec k Float) # |
type Rep1 k (URec k Float) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UFloat" PrefixI True) (S1 k (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat k)))
type Rep1 k (URec k Double) # |
type Rep1 k (URec k Double) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UDouble" PrefixI True) (S1 k (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble k)))
type Rep1 k (URec k Char) # |
type Rep1 k (URec k Char) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UChar" PrefixI True) (S1 k (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UChar k)))
type Rep1 k (URec k (Ptr ())) # |
type Rep1 k (URec k (Ptr ())) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UAddr" PrefixI True) (S1 k (MetaSel (Just Symbol "uAddr#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UAddr k)))
type Rep (URec k Word p) # |
type Rep (URec k Word p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UWord" PrefixI True) (S1 * (MetaSel (Just Symbol "uWord#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UWord *)))
type Rep (URec k Int p) # |
type Rep (URec k Int p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UInt" PrefixI True) (S1 * (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt *)))
type Rep (URec k Float p) # |
type Rep (URec k Float p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UFloat" PrefixI True) (S1 * (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat *)))
type Rep (URec k Double p) # |
type Rep (URec k Double p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UDouble" PrefixI True) (S1 * (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble *)))
type Rep (URec k Char p) # |
type Rep (URec k Char p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UChar" PrefixI True) (S1 * (MetaSel (Just Symbol "uChar#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UChar *)))
type Rep (URec k (Ptr ()) p) # |
type Rep (URec k (Ptr ()) p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UAddr" PrefixI True) (S1 * (MetaSel (Just Symbol "uAddr#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UAddr *)))

type UAddr = URec (Ptr ()) #

Type synonym for ``URec` `Addr#``

Since: 4.9.0.0

type UChar = URec Char #

Type synonym for ``URec` `Char#``

Since: 4.9.0.0

type UDouble = URec Double #

Type synonym for ``URec` `Double#``

Since: 4.9.0.0

type UFloat = URec Float #

Type synonym for ``URec` `Float#``

Since: 4.9.0.0

type UInt = URec Int #

Type synonym for ``URec` `Int#``

Since: 4.9.0.0

type UWord = URec Word #

Type synonym for ``URec` `Word#``

Since: 4.9.0.0

## Synonyms for convenience

type Rec0 = K1 R #

Type synonym for encoding recursion (of kind `*`)

data R #

Tag for K1: recursion (of kind `*`)

type D1 = M1 D #

Type synonym for encoding meta-information for datatypes

type C1 = M1 C #

Type synonym for encoding meta-information for constructors

type S1 = M1 S #

Type synonym for encoding meta-information for record selectors

data D #

Tag for M1: datatype

data C #

Tag for M1: constructor

data S #

Tag for M1: record selector

# Meta-information

class Datatype d where #

Class for datatypes that represent datatypes

Minimal complete definition

datatypeName, moduleName, packageName

Methods

datatypeName :: t d (f :: k -> *) (a :: k) -> [Char] #

The name of the datatype (unqualified)

moduleName :: t d (f :: k -> *) (a :: k) -> [Char] #

The fully-qualified name of the module where the type is declared

packageName :: t d (f :: k -> *) (a :: k) -> [Char] #

The package name of the module where the type is declared

Since: 4.9.0.0

isNewtype :: t d (f :: k -> *) (a :: k) -> Bool #

Marks if the datatype is actually a newtype

Since: 4.7.0.0

Instances

(KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI Bool nt) => Datatype Meta (MetaData n m p nt) # | Since: 4.9.0.0
Methods datatypeName :: t d f a -> [Char] # moduleName :: t d f a -> [Char] # packageName :: t d f a -> [Char] # isNewtype :: t d f a -> Bool #

class Constructor c where #

Class for datatypes that represent data constructors

Minimal complete definition

conName

Methods

conName :: t c (f :: k -> *) (a :: k) -> [Char] #

The name of the constructor

conFixity :: t c (f :: k -> *) (a :: k) -> Fixity #

The fixity of the constructor

conIsRecord :: t c (f :: k -> *) (a :: k) -> Bool #

Marks if this constructor is a record

Instances

(KnownSymbol n, SingI FixityI f, SingI Bool r) => Constructor Meta (MetaCons n f r) # | Since: 4.9.0.0
Methods conName :: t c f a -> [Char] # conFixity :: t c f a -> Fixity # conIsRecord :: t c f a -> Bool #

class Selector s where #

Class for datatypes that represent records

Minimal complete definition

selName, selSourceUnpackedness, selSourceStrictness, selDecidedStrictness

Methods

selName :: t s (f :: k -> *) (a :: k) -> [Char] #

The name of the selector

selSourceUnpackedness :: t s (f :: k -> *) (a :: k) -> SourceUnpackedness #

The selector's unpackedness annotation (if any)

Since: 4.9.0.0

selSourceStrictness :: t s (f :: k -> *) (a :: k) -> SourceStrictness #

The selector's strictness annotation (if any)

Since: 4.9.0.0

selDecidedStrictness :: t s (f :: k -> *) (a :: k) -> DecidedStrictness #

The strictness that the compiler inferred for the selector

Since: 4.9.0.0

Instances

(SingI (Maybe Symbol) mn, SingI SourceUnpackedness su, SingI SourceStrictness ss, SingI DecidedStrictness ds) => Selector Meta (MetaSel mn su ss ds) # | Since: 4.9.0.0
Methods selName :: t s f a -> [Char] # selSourceUnpackedness :: t s f a -> SourceUnpackedness # selSourceStrictness :: t s f a -> SourceStrictness # selDecidedStrictness :: t s f a -> DecidedStrictness #

data Fixity #

Datatype to represent the fixity of a constructor. An infix | declaration directly corresponds to an application of `Infix`.

Constructors

Prefix |
Infix Associativity Int |

Instances

Eq Fixity # |
Methods (==) :: Fixity -> Fixity -> Bool Source # (/=) :: Fixity -> Fixity -> Bool Source #
Data Fixity # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity #

toConstr :: Fixity -> Constr #

dataTypeOf :: Fixity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) #

gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

Ord Fixity # |
Methods compare :: Fixity -> Fixity -> Ordering Source # (<) :: Fixity -> Fixity -> Bool Source # (<=) :: Fixity -> Fixity -> Bool Source # (>) :: Fixity -> Fixity -> Bool Source # (>=) :: Fixity -> Fixity -> Bool Source # max :: Fixity -> Fixity -> Fixity Source # min :: Fixity -> Fixity -> Fixity Source #
Read Fixity # |
Methods readsPrec :: Int -> ReadS Fixity # readList :: ReadS [Fixity] # readPrec :: ReadPrec Fixity # readListPrec :: ReadPrec [Fixity] #
Show Fixity # |
Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
Generic Fixity # |
Associated Types type Rep Fixity :: * -> * # Methods from :: Fixity -> Rep Fixity x # to :: Rep Fixity x -> Fixity #
type Rep Fixity # |
type Rep Fixity = D1 * (MetaData "Fixity" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "Prefix" PrefixI False) (U1 *)) (C1 * (MetaCons "Infix" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Associativity)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))))

data FixityI #

This variant of `Fixity` appears at the type level.

Since: 4.9.0.0

Constructors

PrefixI |
InfixI Associativity Nat |

data Associativity #

Datatype to represent the associativity of a constructor

Constructors

LeftAssociative |
RightAssociative |
NotAssociative |

Instances

Bounded Associativity # |
Methods minBound :: Associativity # maxBound :: Associativity #
Enum Associativity # |

Methods

succ :: Associativity -> Associativity #

pred :: Associativity -> Associativity #

toEnum :: Int -> Associativity #

fromEnum :: Associativity -> Int #

enumFrom :: Associativity -> [Associativity] #

enumFromThen :: Associativity -> Associativity -> [Associativity] #

enumFromTo :: Associativity -> Associativity -> [Associativity] #

enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] #

Eq Associativity # |
Methods (==) :: Associativity -> Associativity -> Bool Source # (/=) :: Associativity -> Associativity -> Bool Source #
Data Associativity # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Associativity -> c Associativity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Associativity #

toConstr :: Associativity -> Constr #

dataTypeOf :: Associativity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Associativity) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Associativity) #

gmapT :: (forall b. Data b => b -> b) -> Associativity -> Associativity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Associativity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Associativity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

Ord Associativity # |

Methods

compare :: Associativity -> Associativity -> Ordering Source #

(<) :: Associativity -> Associativity -> Bool Source #

(<=) :: Associativity -> Associativity -> Bool Source #

(>) :: Associativity -> Associativity -> Bool Source #

(>=) :: Associativity -> Associativity -> Bool Source #

max :: Associativity -> Associativity -> Associativity Source #

min :: Associativity -> Associativity -> Associativity Source #

Read Associativity # |
Methods readsPrec :: Int -> ReadS Associativity # readList :: ReadS [Associativity] # readPrec :: ReadPrec Associativity # readListPrec :: ReadPrec [Associativity] #
Show Associativity # |
Methods showsPrec :: Int -> Associativity -> ShowS # show :: Associativity -> String # showList :: [Associativity] -> ShowS #
Ix Associativity # |
Methods range :: (Associativity, Associativity) -> [Associativity] # index :: (Associativity, Associativity) -> Associativity -> Int # unsafeIndex :: (Associativity, Associativity) -> Associativity -> Int inRange :: (Associativity, Associativity) -> Associativity -> Bool # rangeSize :: (Associativity, Associativity) -> Int # unsafeRangeSize :: (Associativity, Associativity) -> Int
Generic Associativity # |
Associated Types type Rep Associativity :: * -> * # Methods from :: Associativity -> Rep Associativity x # to :: Rep Associativity x -> Associativity #
type Rep Associativity # |
type Rep Associativity = D1 * (MetaData "Associativity" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "LeftAssociative" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "RightAssociative" PrefixI False) (U1 *)) (C1 * (MetaCons "NotAssociative" PrefixI False) (U1 *))))

prec :: Fixity -> Int #

Get the precedence of a fixity value.

data SourceUnpackedness #

The unpackedness of a field as the user wrote it in the source code. For example, in the following data type:

    data E = ExampleConstructor     Int
               {-# NOUNPACK #-} Int
               {-#   UNPACK #-} Int

The fields of `ExampleConstructor` have `NoSourceUnpackedness`, `SourceNoUnpack`, and `SourceUnpack`, respectively.

Since: 4.9.0.0

Constructors

NoSourceUnpackedness |
SourceNoUnpack |
SourceUnpack |

Instances

Bounded SourceUnpackedness # |
Methods minBound :: SourceUnpackedness # maxBound :: SourceUnpackedness #
Enum SourceUnpackedness # |

Methods

succ :: SourceUnpackedness -> SourceUnpackedness #

pred :: SourceUnpackedness -> SourceUnpackedness #

toEnum :: Int -> SourceUnpackedness #

fromEnum :: SourceUnpackedness -> Int #

enumFrom :: SourceUnpackedness -> [SourceUnpackedness] #

enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] #

Eq SourceUnpackedness # |
Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #
Data SourceUnpackedness # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceUnpackedness -> c SourceUnpackedness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceUnpackedness #

toConstr :: SourceUnpackedness -> Constr #

dataTypeOf :: SourceUnpackedness -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SourceUnpackedness) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceUnpackedness) #

gmapT :: (forall b. Data b => b -> b) -> SourceUnpackedness -> SourceUnpackedness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceUnpackedness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceUnpackedness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

Ord SourceUnpackedness # |

Methods

compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering Source #

(<) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #

(<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #

(>) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #

(>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source #

max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #

min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source #

Read SourceUnpackedness # |
Methods readsPrec :: Int -> ReadS SourceUnpackedness # readList :: ReadS [SourceUnpackedness] # readPrec :: ReadPrec SourceUnpackedness # readListPrec :: ReadPrec [SourceUnpackedness] #
Show SourceUnpackedness # |
Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS #
Ix SourceUnpackedness # |

Methods

range :: (SourceUnpackedness, SourceUnpackedness) -> [SourceUnpackedness] #

index :: (SourceUnpackedness, SourceUnpackedness) -> SourceUnpackedness -> Int #

unsafeIndex :: (SourceUnpackedness, SourceUnpackedness) -> SourceUnpackedness -> Int

inRange :: (SourceUnpackedness, SourceUnpackedness) -> SourceUnpackedness -> Bool #

rangeSize :: (SourceUnpackedness, SourceUnpackedness) -> Int #

unsafeRangeSize :: (SourceUnpackedness, SourceUnpackedness) -> Int

Generic SourceUnpackedness # |
Associated Types type Rep SourceUnpackedness :: * -> * # Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness #
type Rep SourceUnpackedness # |
type Rep SourceUnpackedness = D1 * (MetaData "SourceUnpackedness" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "NoSourceUnpackedness" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "SourceNoUnpack" PrefixI False) (U1 *)) (C1 * (MetaCons "SourceUnpack" PrefixI False) (U1 *))))

data SourceStrictness #

The strictness of a field as the user wrote it in the source code. For example, in the following data type:

    data E = ExampleConstructor Int ~Int !Int

The fields of `ExampleConstructor` have `NoSourceStrictness`, `SourceLazy`, and `SourceStrict`, respectively.

Since: 4.9.0.0

Constructors

NoSourceStrictness |
SourceLazy |
SourceStrict |

Instances

Bounded SourceStrictness # |
Methods minBound :: SourceStrictness # maxBound :: SourceStrictness #
Enum SourceStrictness # |

Methods

succ :: SourceStrictness -> SourceStrictness #

pred :: SourceStrictness -> SourceStrictness #

toEnum :: Int -> SourceStrictness #

fromEnum :: SourceStrictness -> Int #

enumFrom :: SourceStrictness -> [SourceStrictness] #

enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] #

enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] #

enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] #

Eq SourceStrictness # |
Methods (==) :: SourceStrictness -> SourceStrictness -> Bool Source # (/=) :: SourceStrictness -> SourceStrictness -> Bool Source #
Data SourceStrictness # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceStrictness -> c SourceStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceStrictness #

toConstr :: SourceStrictness -> Constr #

dataTypeOf :: SourceStrictness -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SourceStrictness) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceStrictness) #

gmapT :: (forall b. Data b => b -> b) -> SourceStrictness -> SourceStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

Ord SourceStrictness # |

Methods

compare :: SourceStrictness -> SourceStrictness -> Ordering Source #

(<) :: SourceStrictness -> SourceStrictness -> Bool Source #

(<=) :: SourceStrictness -> SourceStrictness -> Bool Source #

(>) :: SourceStrictness -> SourceStrictness -> Bool Source #

(>=) :: SourceStrictness -> SourceStrictness -> Bool Source #

max :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #

min :: SourceStrictness -> SourceStrictness -> SourceStrictness Source #

Read SourceStrictness # |
Methods readsPrec :: Int -> ReadS SourceStrictness # readList :: ReadS [SourceStrictness] # readPrec :: ReadPrec SourceStrictness # readListPrec :: ReadPrec [SourceStrictness] #
Show SourceStrictness # |
Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS #
Ix SourceStrictness # |

Methods

range :: (SourceStrictness, SourceStrictness) -> [SourceStrictness] #

index :: (SourceStrictness, SourceStrictness) -> SourceStrictness -> Int #

unsafeIndex :: (SourceStrictness, SourceStrictness) -> SourceStrictness -> Int

inRange :: (SourceStrictness, SourceStrictness) -> SourceStrictness -> Bool #

rangeSize :: (SourceStrictness, SourceStrictness) -> Int #

unsafeRangeSize :: (SourceStrictness, SourceStrictness) -> Int

Generic SourceStrictness # |
Associated Types type Rep SourceStrictness :: * -> * # Methods from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness #
type Rep SourceStrictness # |
type Rep SourceStrictness = D1 * (MetaData "SourceStrictness" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "NoSourceStrictness" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "SourceLazy" PrefixI False) (U1 *)) (C1 * (MetaCons "SourceStrict" PrefixI False) (U1 *))))

data DecidedStrictness #

The strictness that GHC infers for a field during compilation. Whereas there are nine different combinations of `SourceUnpackedness` and `SourceStrictness`, the strictness that GHC decides will ultimately be one of lazy, strict, or unpacked. What GHC decides is affected both by what the user writes in the source code and by GHC flags. As an example, consider this data type:

    data E = ExampleConstructor {-# UNPACK #-} !Int !Int Int

- If compiled without optimization or other language extensions, then the fields of `ExampleConstructor` will have `DecidedStrict`, `DecidedStrict`, and `DecidedLazy`, respectively.
- If compiled with `-XStrictData` enabled, then the fields will have `DecidedStrict`, `DecidedStrict`, and `DecidedStrict`, respectively.
- If compiled with `-O2` enabled, then the fields will have `DecidedUnpack`, `DecidedStrict`, and `DecidedLazy`, respectively.

Since: 4.9.0.0

Constructors

DecidedLazy |
DecidedStrict |
DecidedUnpack |

Instances

Bounded DecidedStrictness # |
Methods minBound :: DecidedStrictness # maxBound :: DecidedStrictness #
Enum DecidedStrictness # |

Methods

succ :: DecidedStrictness -> DecidedStrictness #

pred :: DecidedStrictness -> DecidedStrictness #

toEnum :: Int -> DecidedStrictness #

fromEnum :: DecidedStrictness -> Int #

enumFrom :: DecidedStrictness -> [DecidedStrictness] #

enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] #

Eq DecidedStrictness # |
Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool Source # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #
Data DecidedStrictness # | Since: 4.9.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DecidedStrictness -> c DecidedStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DecidedStrictness #

toConstr :: DecidedStrictness -> Constr #

dataTypeOf :: DecidedStrictness -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DecidedStrictness) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DecidedStrictness) #

gmapT :: (forall b. Data b => b -> b) -> DecidedStrictness -> DecidedStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> DecidedStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DecidedStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

Ord DecidedStrictness # |

Methods

compare :: DecidedStrictness -> DecidedStrictness -> Ordering Source #

(<) :: DecidedStrictness -> DecidedStrictness -> Bool Source #

(<=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #

(>) :: DecidedStrictness -> DecidedStrictness -> Bool Source #

(>=) :: DecidedStrictness -> DecidedStrictness -> Bool Source #

max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #

min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness Source #

Read DecidedStrictness # |
Methods readsPrec :: Int -> ReadS DecidedStrictness # readList :: ReadS [DecidedStrictness] # readPrec :: ReadPrec DecidedStrictness # readListPrec :: ReadPrec [DecidedStrictness] #
Show DecidedStrictness # |
Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS #
Ix DecidedStrictness # |

Methods

range :: (DecidedStrictness, DecidedStrictness) -> [DecidedStrictness] #

index :: (DecidedStrictness, DecidedStrictness) -> DecidedStrictness -> Int #

unsafeIndex :: (DecidedStrictness, DecidedStrictness) -> DecidedStrictness -> Int

inRange :: (DecidedStrictness, DecidedStrictness) -> DecidedStrictness -> Bool #

rangeSize :: (DecidedStrictness, DecidedStrictness) -> Int #

unsafeRangeSize :: (DecidedStrictness, DecidedStrictness) -> Int

Generic DecidedStrictness # |
Associated Types type Rep DecidedStrictness :: * -> * # Methods from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness #
type Rep DecidedStrictness # |
type Rep DecidedStrictness = D1 * (MetaData "DecidedStrictness" "GHC.Generics" "base" False) ((:+:) * (C1 * (MetaCons "DecidedLazy" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "DecidedStrict" PrefixI False) (U1 *)) (C1 * (MetaCons "DecidedUnpack" PrefixI False) (U1 *))))

data Meta #

Datatype to represent metadata associated with a datatype (`MetaData`), constructor (`MetaCons`), or field selector (`MetaSel`).

- In `MetaData n m p nt`, `n` is the datatype's name, `m` is the module in which the datatype is defined, `p` is the package in which the datatype is defined, and `nt` is `'True` if the datatype is a `newtype`.
- In `MetaCons n f s`, `n` is the constructor's name, `f` is its fixity, and `s` is `'True` if the constructor contains record selectors.
- In `MetaSel mn su ss ds`, if the field uses record syntax, then `mn` is `Just` the record name. Otherwise, `mn` is `Nothing`. `su` and `ss` are the field's unpackedness and strictness annotations, and `ds` is the strictness that GHC infers for the field.

Since: 4.9.0.0

Constructors

MetaData Symbol Symbol Symbol Bool |
MetaCons Symbol FixityI Bool |
MetaSel (Maybe Symbol) SourceUnpackedness SourceStrictness DecidedStrictness |

Instances

(KnownSymbol n, SingI FixityI f, SingI Bool r) => Constructor Meta (MetaCons n f r) # | Since: 4.9.0.0
Methods conName :: t c f a -> [Char] # conFixity :: t c f a -> Fixity # conIsRecord :: t c f a -> Bool #
(KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI Bool nt) => Datatype Meta (MetaData n m p nt) # | Since: 4.9.0.0
Methods datatypeName :: t d f a -> [Char] # moduleName :: t d f a -> [Char] # packageName :: t d f a -> [Char] # isNewtype :: t d f a -> Bool #
(SingI (Maybe Symbol) mn, SingI SourceUnpackedness su, SingI SourceStrictness ss, SingI DecidedStrictness ds) => Selector Meta (MetaSel mn su ss ds) # | Since: 4.9.0.0
Methods selName :: t s f a -> [Char] # selSourceUnpackedness :: t s f a -> SourceUnpackedness # selSourceStrictness :: t s f a -> SourceStrictness # selDecidedStrictness :: t s f a -> DecidedStrictness #

# Generic type classes

class Generic a where #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

Minimal complete definition

from, to

Associated Types

type Rep a :: * -> * #

Generic representation type

Methods

from :: a -> Rep a x #

Convert from the datatype to its representation

to :: Rep a x -> a #

Convert from the representation to the datatype

Instances

Generic Bool # |
Associated Types type Rep Bool :: * -> * # Methods from :: Bool -> Rep Bool x # to :: Rep Bool x -> Bool #
Generic Ordering # |
Associated Types type Rep Ordering :: * -> * # Methods from :: Ordering -> Rep Ordering x # to :: Rep Ordering x -> Ordering #
Generic () # |
Associated Types type Rep () :: * -> * # Methods from :: () -> Rep () x # to :: Rep () x -> () #
Generic DecidedStrictness # |
Associated Types type Rep DecidedStrictness :: * -> * # Methods from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness #
Generic SourceStrictness # |
Associated Types type Rep SourceStrictness :: * -> * # Methods from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness #
Generic SourceUnpackedness # |
Associated Types type Rep SourceUnpackedness :: * -> * # Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness #
Generic Associativity # |
Associated Types type Rep Associativity :: * -> * # Methods from :: Associativity -> Rep Associativity x # to :: Rep Associativity x -> Associativity #
Generic Fixity # |
Associated Types type Rep Fixity :: * -> * # Methods from :: Fixity -> Rep Fixity x # to :: Rep Fixity x -> Fixity #
Generic Any # |
Associated Types type Rep Any :: * -> * # Methods from :: Any -> Rep Any x # to :: Rep Any x -> Any #
Generic All # |
Associated Types type Rep All :: * -> * # Methods from :: All -> Rep All x # to :: Rep All x -> All #
Generic ExitCode # |
Associated Types type Rep ExitCode :: * -> * # Methods from :: ExitCode -> Rep ExitCode x # to :: Rep ExitCode x -> ExitCode #
Generic Version # |
Associated Types type Rep Version :: * -> * # Methods from :: Version -> Rep Version x # to :: Rep Version x -> Version #
Generic Void # |
Associated Types type Rep Void :: * -> * # Methods from :: Void -> Rep Void x # to :: Rep Void x -> Void #
Generic [a] # |
Associated Types type Rep [a] :: * -> * # Methods from :: [a] -> Rep [a] x # to :: Rep [a] x -> [a] #
Generic (Maybe a) # |
Associated Types type Rep (Maybe a) :: * -> * # Methods from :: Maybe a -> Rep (Maybe a) x # to :: Rep (Maybe a) x -> Maybe a #
Generic (Par1 p) # |
Associated Types type Rep (Par1 p) :: * -> * # Methods from :: Par1 p -> Rep (Par1 p) x # to :: Rep (Par1 p) x -> Par1 p #
Generic (Last a) # |
Associated Types type Rep (Last a) :: * -> * # Methods from :: Last a -> Rep (Last a) x # to :: Rep (Last a) x -> Last a #
Generic (First a) # |
Associated Types type Rep (First a) :: * -> * # Methods from :: First a -> Rep (First a) x # to :: Rep (First a) x -> First a #
Generic (Product a) # |
Associated Types type Rep (Product a) :: * -> * # Methods from :: Product a -> Rep (Product a) x # to :: Rep (Product a) x -> Product a #
Generic (Sum a) # |
Associated Types type Rep (Sum a) :: * -> * # Methods from :: Sum a -> Rep (Sum a) x # to :: Rep (Sum a) x -> Sum a #
Generic (Endo a) # |
Associated Types type Rep (Endo a) :: * -> * # Methods from :: Endo a -> Rep (Endo a) x # to :: Rep (Endo a) x -> Endo a #
Generic (Dual a) # |
Associated Types type Rep (Dual a) :: * -> * # Methods from :: Dual a -> Rep (Dual a) x # to :: Rep (Dual a) x -> Dual a #
Generic (Identity a) # |
Associated Types type Rep (Identity a) :: * -> * # Methods from :: Identity a -> Rep (Identity a) x # to :: Rep (Identity a) x -> Identity a #
Generic (ZipList a) # |
Associated Types type Rep (ZipList a) :: * -> * # Methods from :: ZipList a -> Rep (ZipList a) x # to :: Rep (ZipList a) x -> ZipList a #
Generic (NonEmpty a) # |
Associated Types type Rep (NonEmpty a) :: * -> * # Methods from :: NonEmpty a -> Rep (NonEmpty a) x # to :: Rep (NonEmpty a) x -> NonEmpty a #
Generic (Option a) # |
Associated Types type Rep (Option a) :: * -> * # Methods from :: Option a -> Rep (Option a) x # to :: Rep (Option a) x -> Option a #
Generic (WrappedMonoid m) # |
Associated Types type Rep (WrappedMonoid m) :: * -> * # Methods from :: WrappedMonoid m -> Rep (WrappedMonoid m) x # to :: Rep (WrappedMonoid m) x -> WrappedMonoid m #
Generic (Last a) # |
Associated Types type Rep (Last a) :: * -> * # Methods from :: Last a -> Rep (Last a) x # to :: Rep (Last a) x -> Last a #
Generic (First a) # |
Associated Types type Rep (First a) :: * -> * # Methods from :: First a -> Rep (First a) x # to :: Rep (First a) x -> First a #
Generic (Max a) # |
Associated Types type Rep (Max a) :: * -> * # Methods from :: Max a -> Rep (Max a) x # to :: Rep (Max a) x -> Max a #
Generic (Min a) # |
Associated Types type Rep (Min a) :: * -> * # Methods from :: Min a -> Rep (Min a) x # to :: Rep (Min a) x -> Min a #
Generic (Complex a) # |
Associated Types type Rep (Complex a) :: * -> * # Methods from :: Complex a -> Rep (Complex a) x # to :: Rep (Complex a) x -> Complex a #
Generic (Either a b) # |
Associated Types type Rep (Either a b) :: * -> * # Methods from :: Either a b -> Rep (Either a b) x # to :: Rep (Either a b) x -> Either a b #
Generic (V1 k p) # |
Associated Types type Rep (V1 k p) :: * -> * # Methods from :: V1 k p -> Rep (V1 k p) x # to :: Rep (V1 k p) x -> V1 k p #
Generic (U1 k p) # |
Associated Types type Rep (U1 k p) :: * -> * # Methods from :: U1 k p -> Rep (U1 k p) x # to :: Rep (U1 k p) x -> U1 k p #
Generic (a, b) # |
Associated Types type Rep (a, b) :: * -> * # Methods from :: (a, b) -> Rep (a, b) x # to :: Rep (a, b) x -> (a, b) #
Generic (Proxy k t) # |
Associated Types type Rep (Proxy k t) :: * -> * # Methods from :: Proxy k t -> Rep (Proxy k t) x # to :: Rep (Proxy k t) x -> Proxy k t #
Generic (WrappedMonad m a) # |
Associated Types type Rep (WrappedMonad m a) :: * -> * # Methods from :: WrappedMonad m a -> Rep (WrappedMonad m a) x # to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #
Generic (Arg a b) # |
Associated Types type Rep (Arg a b) :: * -> * # Methods from :: Arg a b -> Rep (Arg a b) x # to :: Rep (Arg a b) x -> Arg a b #
Generic (Rec1 k f p) # |
Associated Types type Rep (Rec1 k f p) :: * -> * # Methods from :: Rec1 k f p -> Rep (Rec1 k f p) x # to :: Rep (Rec1 k f p) x -> Rec1 k f p #
Generic (URec k Word p) # |
Associated Types type Rep (URec k Word p) :: * -> * # Methods from :: URec k Word p -> Rep (URec k Word p) x # to :: Rep (URec k Word p) x -> URec k Word p #
Generic (URec k Int p) # |
Associated Types type Rep (URec k Int p) :: * -> * # Methods from :: URec k Int p -> Rep (URec k Int p) x # to :: Rep (URec k Int p) x -> URec k Int p #
Generic (URec k Float p) # |
Associated Types type Rep (URec k Float p) :: * -> * # Methods from :: URec k Float p -> Rep (URec k Float p) x # to :: Rep (URec k Float p) x -> URec k Float p #
Generic (URec k Double p) # |
Associated Types type Rep (URec k Double p) :: * -> * # Methods from :: URec k Double p -> Rep (URec k Double p) x # to :: Rep (URec k Double p) x -> URec k Double p #
Generic (URec k Char p) # |
Associated Types type Rep (URec k Char p) :: * -> * # Methods from :: URec k Char p -> Rep (URec k Char p) x # to :: Rep (URec k Char p) x -> URec k Char p #
Generic (URec k (Ptr ()) p) # |
Associated Types type Rep (URec k (Ptr ()) p) :: * -> * # Methods from :: URec k (Ptr ()) p -> Rep (URec k (Ptr ()) p) x # to :: Rep (URec k (Ptr ()) p) x -> URec k (Ptr ()) p #
Generic (a, b, c) # |
Associated Types type Rep (a, b, c) :: * -> * # Methods from :: (a, b, c) -> Rep (a, b, c) x # to :: Rep (a, b, c) x -> (a, b, c) #
Generic (Alt k f a) # |
Associated Types type Rep (Alt k f a) :: * -> * # Methods from :: Alt k f a -> Rep (Alt k f a) x # to :: Rep (Alt k f a) x -> Alt k f a #
Generic (Const k a b) # |
Associated Types type Rep (Const k a b) :: * -> * # Methods from :: Const k a b -> Rep (Const k a b) x # to :: Rep (Const k a b) x -> Const k a b #
Generic (WrappedArrow a b c) # |
Associated Types type Rep (WrappedArrow a b c) :: * -> * # Methods from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x # to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #
Generic (K1 k i c p) # |
Associated Types type Rep (K1 k i c p) :: * -> * # Methods from :: K1 k i c p -> Rep (K1 k i c p) x # to :: Rep (K1 k i c p) x -> K1 k i c p #
Generic ((:+:) k f g p) # |
Associated Types type Rep ((k :+: f) g p) :: * -> * # Methods from :: (k :+: f) g p -> Rep ((k :+: f) g p) x # to :: Rep ((k :+: f) g p) x -> (k :+: f) g p #
Generic ((:*:) k f g p) # |
Associated Types type Rep ((k :*: f) g p) :: * -> * # Methods from :: (k :*: f) g p -> Rep ((k :*: f) g p) x # to :: Rep ((k :*: f) g p) x -> (k :*: f) g p #
Generic (a, b, c, d) # |
Associated Types type Rep (a, b, c, d) :: * -> * # Methods from :: (a, b, c, d) -> Rep (a, b, c, d) x # to :: Rep (a, b, c, d) x -> (a, b, c, d) #
Generic (Sum k f g a) # |
Associated Types type Rep (Sum k f g a) :: * -> * # Methods from :: Sum k f g a -> Rep (Sum k f g a) x # to :: Rep (Sum k f g a) x -> Sum k f g a #
Generic (Product k f g a) # |
Associated Types type Rep (Product k f g a) :: * -> * # Methods from :: Product k f g a -> Rep (Product k f g a) x # to :: Rep (Product k f g a) x -> Product k f g a #
Generic (M1 k i c f p) # |
Associated Types type Rep (M1 k i c f p) :: * -> * # Methods from :: M1 k i c f p -> Rep (M1 k i c f p) x # to :: Rep (M1 k i c f p) x -> M1 k i c f p #
Generic ((:.:) k2 k1 f g p) # |
Associated Types type Rep ((k2 :.: k1) f g p) :: * -> * # Methods from :: (k2 :.: k1) f g p -> Rep ((k2 :.: k1) f g p) x # to :: Rep ((k2 :.: k1) f g p) x -> (k2 :.: k1) f g p #
Generic (a, b, c, d, e) # |
Associated Types type Rep (a, b, c, d, e) :: * -> * # Methods from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x # to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #
Generic (Compose k1 k2 f g a) # |
Associated Types type Rep (Compose k1 k2 f g a) :: * -> * # Methods from :: Compose k1 k2 f g a -> Rep (Compose k1 k2 f g a) x # to :: Rep (Compose k1 k2 f g a) x -> Compose k1 k2 f g a #
Generic (a, b, c, d, e, f) # |
Associated Types type Rep (a, b, c, d, e, f) :: * -> * # Methods from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x # to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #
Generic (a, b, c, d, e, f, g) # |
Associated Types type Rep (a, b, c, d, e, f, g) :: * -> * # Methods from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x # to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

class Generic1 (f :: k -> *) where #

Representable types of kind `* -> *` (or kind `k -> *`, when `PolyKinds` is enabled). This class is derivable in GHC with the `DeriveGeneric` flag on.

Minimal complete definition

from1, to1

Associated Types

type Rep1 f :: k -> * #

Generic representation type

Methods

from1 :: f a -> Rep1 f a #

Convert from the datatype to its representation

to1 :: Rep1 f a -> f a #

Convert from the representation to the datatype

Instances

Generic1 k (U1 k) # |
Associated Types type Rep1 (U1 k) (f :: U1 k -> *) :: k -> * # Methods from1 :: f a -> Rep1 (U1 k) f a # to1 :: Rep1 (U1 k) f a -> f a #
Generic1 k (V1 k) # |
Associated Types type Rep1 (V1 k) (f :: V1 k -> *) :: k -> * # Methods from1 :: f a -> Rep1 (V1 k) f a # to1 :: Rep1 (V1 k) f a -> f a #
Generic1 k (Proxy k) # |
Associated Types type Rep1 (Proxy k) (f :: Proxy k -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Proxy k) f a # to1 :: Rep1 (Proxy k) f a -> f a #
Generic1 k (URec k Word) # |
Associated Types type Rep1 (URec k Word) (f :: URec k Word -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Word) f a # to1 :: Rep1 (URec k Word) f a -> f a #
Generic1 k (URec k Int) # |
Associated Types type Rep1 (URec k Int) (f :: URec k Int -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Int) f a # to1 :: Rep1 (URec k Int) f a -> f a #
Generic1 k (URec k Float) # |
Associated Types type Rep1 (URec k Float) (f :: URec k Float -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Float) f a # to1 :: Rep1 (URec k Float) f a -> f a #
Generic1 k (URec k Double) # |
Associated Types type Rep1 (URec k Double) (f :: URec k Double -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Double) f a # to1 :: Rep1 (URec k Double) f a -> f a #
Generic1 k (URec k Char) # |
Associated Types type Rep1 (URec k Char) (f :: URec k Char -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k Char) f a # to1 :: Rep1 (URec k Char) f a -> f a #
Generic1 k (URec k (Ptr ())) # |
Associated Types type Rep1 (URec k (Ptr ())) (f :: URec k (Ptr ()) -> *) :: k -> * # Methods from1 :: f a -> Rep1 (URec k (Ptr ())) f a # to1 :: Rep1 (URec k (Ptr ())) f a -> f a #
Generic1 k (Rec1 k f) # |
Associated Types type Rep1 (Rec1 k f) (f :: Rec1 k f -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Rec1 k f) f a # to1 :: Rep1 (Rec1 k f) f a -> f a #
Generic1 k (Alt k f) # |
Associated Types type Rep1 (Alt k f) (f :: Alt k f -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Alt k f) f a # to1 :: Rep1 (Alt k f) f a -> f a #
Generic1 k (Const k a) # |
Associated Types type Rep1 (Const k a) (f :: Const k a -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Const k a) f a # to1 :: Rep1 (Const k a) f a -> f a #
Generic1 k ((:*:) k f g) # |
Associated Types type Rep1 ((k :*: f) g) (f :: (k :*: f) g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((k :*: f) g) f a # to1 :: Rep1 ((k :*: f) g) f a -> f a #
Generic1 k ((:+:) k f g) # |
Associated Types type Rep1 ((k :+: f) g) (f :: (k :+: f) g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((k :+: f) g) f a # to1 :: Rep1 ((k :+: f) g) f a -> f a #
Generic1 k (K1 k i c) # |
Associated Types type Rep1 (K1 k i c) (f :: K1 k i c -> *) :: k -> * # Methods from1 :: f a -> Rep1 (K1 k i c) f a # to1 :: Rep1 (K1 k i c) f a -> f a #
Generic1 k (Sum k f g) # |
Associated Types type Rep1 (Sum k f g) (f :: Sum k f g -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Sum k f g) f a # to1 :: Rep1 (Sum k f g) f a -> f a #
Generic1 k (Product k f g) # |
Associated Types type Rep1 (Product k f g) (f :: Product k f g -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Product k f g) f a # to1 :: Rep1 (Product k f g) f a -> f a #
Functor f => Generic1 k ((:.:) * k f g) # |
Associated Types type Rep1 ((* :.: k) f g) (f :: (* :.: k) f g -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((* :.: k) f g) f a # to1 :: Rep1 ((* :.: k) f g) f a -> f a #
Generic1 k (M1 k i c f) # |
Associated Types type Rep1 (M1 k i c f) (f :: M1 k i c f -> *) :: k -> * # Methods from1 :: f a -> Rep1 (M1 k i c f) f a # to1 :: Rep1 (M1 k i c f) f a -> f a #
Functor f => Generic1 k (Compose * k f g) # |
Associated Types type Rep1 (Compose * k f g) (f :: Compose * k f g -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Compose * k f g) f a # to1 :: Rep1 (Compose * k f g) f a -> f a #
Generic1 * [] # |
Associated Types type Rep1 [] (f :: [] -> *) :: k -> * # Methods from1 :: f a -> Rep1 [] f a # to1 :: Rep1 [] f a -> f a #
Generic1 * Maybe # |
Associated Types type Rep1 Maybe (f :: Maybe -> *) :: k -> * # Methods from1 :: f a -> Rep1 Maybe f a # to1 :: Rep1 Maybe f a -> f a #
Generic1 * Par1 # |
Associated Types type Rep1 Par1 (f :: Par1 -> *) :: k -> * # Methods from1 :: f a -> Rep1 Par1 f a # to1 :: Rep1 Par1 f a -> f a #
Generic1 * Last # |
Associated Types type Rep1 Last (f :: Last -> *) :: k -> * # Methods from1 :: f a -> Rep1 Last f a # to1 :: Rep1 Last f a -> f a #
Generic1 * First # |
Associated Types type Rep1 First (f :: First -> *) :: k -> * # Methods from1 :: f a -> Rep1 First f a # to1 :: Rep1 First f a -> f a #
Generic1 * Product # |
Associated Types type Rep1 Product (f :: Product -> *) :: k -> * # Methods from1 :: f a -> Rep1 Product f a # to1 :: Rep1 Product f a -> f a #
Generic1 * Sum # |
Associated Types type Rep1 Sum (f :: Sum -> *) :: k -> * # Methods from1 :: f a -> Rep1 Sum f a # to1 :: Rep1 Sum f a -> f a #
Generic1 * Dual # |
Associated Types type Rep1 Dual (f :: Dual -> *) :: k -> * # Methods from1 :: f a -> Rep1 Dual f a # to1 :: Rep1 Dual f a -> f a #
Generic1 * Identity # |
Associated Types type Rep1 Identity (f :: Identity -> *) :: k -> * # Methods from1 :: f a -> Rep1 Identity f a # to1 :: Rep1 Identity f a -> f a #
Generic1 * ZipList # |
Associated Types type Rep1 ZipList (f :: ZipList -> *) :: k -> * # Methods from1 :: f a -> Rep1 ZipList f a # to1 :: Rep1 ZipList f a -> f a #
Generic1 * NonEmpty # |
Associated Types type Rep1 NonEmpty (f :: NonEmpty -> *) :: k -> * # Methods from1 :: f a -> Rep1 NonEmpty f a # to1 :: Rep1 NonEmpty f a -> f a #
Generic1 * Option # |
Associated Types type Rep1 Option (f :: Option -> *) :: k -> * # Methods from1 :: f a -> Rep1 Option f a # to1 :: Rep1 Option f a -> f a #
Generic1 * WrappedMonoid # |
Associated Types type Rep1 WrappedMonoid (f :: WrappedMonoid -> *) :: k -> * # Methods from1 :: f a -> Rep1 WrappedMonoid f a # to1 :: Rep1 WrappedMonoid f a -> f a #
Generic1 * Last # |
Associated Types type Rep1 Last (f :: Last -> *) :: k -> * # Methods from1 :: f a -> Rep1 Last f a # to1 :: Rep1 Last f a -> f a #
Generic1 * First # |
Associated Types type Rep1 First (f :: First -> *) :: k -> * # Methods from1 :: f a -> Rep1 First f a # to1 :: Rep1 First f a -> f a #
Generic1 * Max # |
Associated Types type Rep1 Max (f :: Max -> *) :: k -> * # Methods from1 :: f a -> Rep1 Max f a # to1 :: Rep1 Max f a -> f a #
Generic1 * Min # |
Associated Types type Rep1 Min (f :: Min -> *) :: k -> * # Methods from1 :: f a -> Rep1 Min f a # to1 :: Rep1 Min f a -> f a #
Generic1 * Complex # |
Associated Types type Rep1 Complex (f :: Complex -> *) :: k -> * # Methods from1 :: f a -> Rep1 Complex f a # to1 :: Rep1 Complex f a -> f a #
Generic1 * (Either a) # |
Associated Types type Rep1 (Either a) (f :: Either a -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Either a) f a # to1 :: Rep1 (Either a) f a -> f a #
Generic1 * ((,) a) # |
Associated Types type Rep1 ((,) a) (f :: (,) a -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,) a) f a # to1 :: Rep1 ((,) a) f a -> f a #
Generic1 * (WrappedMonad m) # |
Associated Types type Rep1 (WrappedMonad m) (f :: WrappedMonad m -> *) :: k -> * # Methods from1 :: f a -> Rep1 (WrappedMonad m) f a # to1 :: Rep1 (WrappedMonad m) f a -> f a #
Generic1 * (Arg a) # |
Associated Types type Rep1 (Arg a) (f :: Arg a -> *) :: k -> * # Methods from1 :: f a -> Rep1 (Arg a) f a # to1 :: Rep1 (Arg a) f a -> f a #
Generic1 * ((,,) a b) # |
Associated Types type Rep1 ((,,) a b) (f :: (,,) a b -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,,) a b) f a # to1 :: Rep1 ((,,) a b) f a -> f a #
Generic1 * (WrappedArrow a b) # |
Associated Types type Rep1 (WrappedArrow a b) (f :: WrappedArrow a b -> *) :: k -> * # Methods from1 :: f a -> Rep1 (WrappedArrow a b) f a # to1 :: Rep1 (WrappedArrow a b) f a -> f a #
Generic1 * ((,,,) a b c) # |
Associated Types type Rep1 ((,,,) a b c) (f :: (,,,) a b c -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,,,) a b c) f a # to1 :: Rep1 ((,,,) a b c) f a -> f a #
Generic1 * ((,,,,) a b c d) # |
Associated Types type Rep1 ((,,,,) a b c d) (f :: (,,,,) a b c d -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,,,,) a b c d) f a # to1 :: Rep1 ((,,,,) a b c d) f a -> f a #
Generic1 * ((,,,,,) a b c d e) # |
Associated Types type Rep1 ((,,,,,) a b c d e) (f :: (,,,,,) a b c d e -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,,,,,) a b c d e) f a # to1 :: Rep1 ((,,,,,) a b c d e) f a -> f a #
Generic1 * ((,,,,,,) a b c d e f) # |
Associated Types type Rep1 ((,,,,,,) a b c d e f) (f :: (,,,,,,) a b c d e f -> *) :: k -> * # Methods from1 :: f a -> Rep1 ((,,,,,,) a b c d e f) f a # to1 :: Rep1 ((,,,,,,) a b c d e f) f a -> f a #