GHC.Generics.Generically

generically-0.1: Generically newtype to use with DerivingVia

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Generics.Generically

Description

This module exports `Generically` and `Generically` newtypes meant to be used with GHC.Generics and `DerivingVia`.

These types are re-exported from GHC.Generics on `base-4.17` and later, and defined here for older `base` versions.

Synopsis

- newtype Generically a = Generically a
- newtype Generically1 f a = Generically1 (f a)

# Documentation

newtype Generically a #

A type whose instances are defined generically, using the `Generic` representation.

Constructors

Generically a |

#### Instances

Instances details

(Generic a, Monoid (Rep a ())) => Monoid (Generically a) # |
Instance details Defined in GHC.Generics.Generically Methods mempty :: Generically a # mappend :: Generically a -> Generically a -> Generically a # mconcat :: [Generically a] -> Generically a #
(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a) # |
Instance details Defined in GHC.Generics.Generically Methods (<>) :: Generically a -> Generically a -> Generically a # sconcat :: NonEmpty (Generically a) -> Generically a # stimes :: Integral b => b -> Generically a -> Generically a #

newtype Generically1 f a #

A datatype whose instances are defined generically, using the `Generic` representation. `Generically1` is a higher-kinded version of `Generically` that uses `Generic1`.

Constructors

Generically1 (f a) |

#### Instances

Instances details

(Generic1 f, Eq1 (Rep1 f)) => Eq1 (Generically1 f) # |
Instance details Defined in GHC.Generics.Generically Methods liftEq :: (a -> b -> Bool) -> Generically1 f a -> Generically1 f b -> Bool #
(Generic1 f, Ord1 (Rep1 f)) => Ord1 (Generically1 f) # |
Instance details Defined in GHC.Generics.Generically Methods liftCompare :: (a -> b -> Ordering) -> Generically1 f a -> Generically1 f b -> Ordering #
(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f) # |
Instance details Defined in GHC.Generics.Generically Methods empty :: Generically1 f a # (<|>) :: Generically1 f a -> Generically1 f a -> Generically1 f a # some :: Generically1 f a -> Generically1 f [a] # many :: Generically1 f a -> Generically1 f [a] #
(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) # |
Instance details Defined in GHC.Generics.Generically Methods pure :: a -> Generically1 f a # (<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b # liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c # (*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b # (<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a #
(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f) # |
Instance details Defined in GHC.Generics.Generically Methods fmap :: (a -> b) -> Generically1 f a -> Generically1 f b # (<$) :: a -> Generically1 f b -> Generically1 f a #