HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulederiving-aeson-0.2.10Haskell2010

Deriving.Aeson

Type-directed aeson instance CustomJSONisation

  • 18 types
  • 5 classes

Sum encoding

4 declarations

Name modifiers

6 declarations
datadata CamelTo (separator :: Symbol)
#

Generic CamelTo constructor taking in a separator char

Instances1StringModifier

Interface

2 declarations
classclass AesonOptions (xs :: k) where
#

Reify Options from a type-level list

Instances12AesonOptions, …
classclass StringModifier (t :: k) where
#

Reify a function which modifies names

Instances9StringModifier, …

Reexports

3 declarations
classclass FromJSON a where
#

A type that can be converted from JSON, with the possibility of failure.

In many cases, you can get the compiler to generate parsing code for you (see below). To begin, let's cover writing an instance by hand.

There are various reasons a conversion could fail. For example, an Object could be missing a required key, an Array could be of the wrong size, or a value could be of an incompatible type.

The basic ways to signal a failed conversion are as follows:

  • fail yields a custom error message: it is the recommended way of reporting a failure;

  • empty (or mzero) is uninformative: use it when the error is meant to be caught by some (<|>);

  • typeMismatch can be used to report a failure when the encountered value is not of the expected JSON type; unexpected is an appropriate alternative when more than one type may be expected, or to keep the expected type implicit.

prependFailure (or modifyFailure) add more information to a parser's error messages.

An example type and instance using typeMismatch and prependFailure:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance FromJSON Coord where
    parseJSON (Object v) = Coord
        <$> v .: "x"
        <*> v .: "y"

    -- We do not expect a non-Object value here.
    -- We could use empty to fail, but typeMismatch
    -- gives a much more informative error message.
    parseJSON invalid    =
        prependFailure "parsing Coord failed, "
            (typeMismatch "Object" invalid)

For this common case of only being concerned with a single type of JSON value, the functions withObject, withScientific, etc. are provided. Their use is to be preferred when possible, since they are more terse. Using withObject, we can rewrite the above instance (assuming the same language extension and data type) as:

instance FromJSON Coord where
    parseJSON = withObject "Coord" $ \v -> Coord
        <$> v .: "x"
        <*> v .: "y"

Instead of manually writing your FromJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.

  • The compiler can provide a default generic implementation for parseJSON.

To use the second, simply add a deriving Generic clause to your datatype and declare a FromJSON instance for your datatype without giving a definition for parseJSON.

For example, the previous example can be simplified to just:

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance FromJSON Coord

or using the DerivingVia extension

deriving via Generically Coord instance FromJSON Coord

The default implementation will be equivalent to parseJSON = genericParseJSON defaultOptions; if you need different options, you can customize the generic decoding by defining:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance FromJSON Coord where
    parseJSON = genericParseJSON customOptions
Instances115FromJSON, …
classclass ToJSON a where
#

A type that can be converted to JSON.

Instances in general must specify toJSON and should (but don't need to) specify toEncoding.

An example type and instance:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance ToJSON Coord where
  toJSON (Coord x y) = object ["x" .= x, "y" .= y]

  toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y)

Instead of manually writing your ToJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.

  • The compiler can provide a default generic implementation for toJSON.

To use the second, simply add a deriving Generic clause to your datatype and declare a ToJSON instance. If you require nothing other than defaultOptions, it is sufficient to write (and this is the only alternative where the default toJSON implementation is sufficient):

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

or more conveniently using the DerivingVia extension

deriving via Generically Coord instance ToJSON Coord

If on the other hand you wish to customize the generic decoding, you have to implement both methods:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance ToJSON Coord where
    toJSON     = genericToJSON customOptions
    toEncoding = genericToEncoding customOptions

Previous versions of this library only had the toJSON method. Adding toEncoding had two reasons:

  1. toEncoding is more efficient for the common case that the output of toJSON is directly serialized to a ByteString. Further, expressing either method in terms of the other would be non-optimal.

  2. The choice of defaults allows a smooth transition for existing users: Existing instances that do not define toEncoding still compile and have the correct semantics. This is ensured by making the default implementation of toEncoding use toJSON. This produces correct results, but since it performs an intermediate conversion to a Value, it will be less efficient than directly emitting an Encoding. (this also means that specifying nothing more than instance ToJSON Coord would be sufficient as a generically decoding instance, but there probably exists no good reason to not specify toEncoding in new instances.)

Instances115ToJSON, …
classclass Generic a where
#

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

A Generic instance must satisfy the following laws:

from . to ≡ Prelude.id
to . from ≡ Prelude.id
Instances266Generic, …
  • Generic ValueDefined in aeson-2.3.2.0 · Data.Aeson.Types.Internal
  • Generic CCFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic ConcFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic DebugFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic DoCostCentresDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic DoHeapProfileDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic DoTraceDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic GCFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic GiveGCStatsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic HpcFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic MiscFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic ParFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic ProfFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic RTSFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic TickyFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic TraceFlagsDefined in base-4.22.0.0 · GHC.RTS.Flags
  • Generic GCDetailsDefined in base-4.22.0.0 · GHC.Stats
  • Generic RTSStatsDefined in base-4.22.0.0 · GHC.Stats
  • Generic ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.Internal
  • Generic VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic ByteOrderDefined in ghc-internal-9.1401.0 · GHC.Internal.ByteOrder
  • Generic ClosureTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.ClosureTypes
  • Generic AllDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic AnyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic VersionDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Version
  • Generic FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic ForeignSrcLangDefined in ghc-internal-9.1401.0 · GHC.Internal.ForeignSrcLang
  • Generic AssociativityDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic PrimTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic TsoFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic WhatNextDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic WhyBlockedDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic StgInfoTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.Types
  • Generic CostCentreDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.Types
  • Generic CostCentreStackDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.Types
  • Generic IndexTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.Types
  • Generic StgTSOProfInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.Types
  • Generic ExitCodeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Exception
  • Generic ExtensionDefined in ghc-internal-9.1401.0 · GHC.Internal.LanguageExtensions
  • Generic CCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic ConcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic DebugFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic DoCostCentresDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic DoHeapProfileDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic DoTraceDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic GCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic GiveGCStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic HpcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic MiscFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic ParFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic ProfFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic RTSFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic TickyFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic TraceFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.Flags
  • Generic SrcLocDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic GCDetailsDefined in ghc-internal-9.1401.0 · GHC.Internal.Stats
  • Generic RTSStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.Stats
  • Generic AnnLookupDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic AnnTargetDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic BangDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic BndrVisDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic BodyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic BytesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic CallconvDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ConDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic DecDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic DerivClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic DerivStrategyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic DocLocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ExpDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic FamilyResultSigDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic FixityDirectionDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ForeignDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic FunDepDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic GuardDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic InfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic InjectivityAnnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic InlineDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic LitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic LocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic MatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ModNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic ModuleInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic NameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic NameFlavourDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic NameSpaceDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic NamespaceSpecifierDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic OccNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic OverlapDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PatDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PatSynArgsDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PatSynDirDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PhasesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PkgNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic PragmaDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic RangeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic RoleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic RuleBndrDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic RuleMatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic SafetyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic SpecificityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic StmtDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic TyLitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic TySynEqnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic TypeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic TypeFamilyHeadDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic GeneralCategoryDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic URIDefined in network-uri-2.6.4.2 · Network.URI
  • Generic URIAuthDefined in network-uri-2.6.4.2 · Network.URI
  • Generic OsCharDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic OsStringDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic PosixCharDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic PosixStringDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic WindowsCharDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic WindowsStringDefined in os-string-2.0.8 · System.OsString.Internal.Types
  • Generic ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJ
  • Generic ConstructorInfoDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic ConstructorVariantDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic DatatypeInfoDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic DatatypeVariantDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic FieldStrictnessDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic StrictnessDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic UnpackednessDefined in th-abstraction-0.7.2.0 · Language.Haskell.TH.Datatype
  • Generic CalendarDiffDaysDefined in time-1.15 · Data.Time.Calendar.CalendarDiffDays
  • Generic DayDefined in time-1.15 · Data.Time.Calendar.Days
  • Generic MonthDefined in time-1.15 · Data.Time.Calendar.Month
  • Generic QuarterDefined in time-1.15 · Data.Time.Calendar.Quarter
  • Generic QuarterOfYearDefined in time-1.15 · Data.Time.Calendar.Quarter
  • Generic DayOfWeekDefined in time-1.15 · Data.Time.Calendar.Week
  • Generic SystemTimeDefined in time-1.15 · Data.Time.Clock.Internal.SystemTime
  • Generic UTCTimeDefined in time-1.15 · Data.Time.Clock.Internal.UTCTime
  • Generic UniversalTimeDefined in time-1.15 · Data.Time.Clock.Internal.UniversalTime
  • Generic CalendarDiffTimeDefined in time-1.15 · Data.Time.LocalTime.Internal.CalendarDiffTime
  • Generic LocalTimeDefined in time-1.15 · Data.Time.LocalTime.Internal.LocalTime
  • Generic TimeOfDayDefined in time-1.15 · Data.Time.LocalTime.Internal.TimeOfDay
  • Generic TimeZoneDefined in time-1.15 · Data.Time.LocalTime.Internal.TimeZone
  • Generic ZonedTimeDefined in time-1.15 · Data.Time.LocalTime.Internal.ZonedTime
  • Generic ()Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Complex a)Defined in base-4.22.0.0 · Data.Complex
  • Generic (First a)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (Last a)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (Max a)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (Min a)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (WrappedMonoid m)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (SCC vertex)Defined in containers-0.8 · Data.Graph
  • Generic (Digit a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (Elem a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (FingerTree a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (Node a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (ViewL a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (ViewR a)Defined in containers-0.8 · Data.Sequence.Internal
  • Generic (PostOrder a)Defined in containers-0.8 · Data.Tree
  • Generic (Tree a)Defined in containers-0.8 · Data.Tree
  • Generic (Fix f)Defined in data-fix-0.3.4 · Data.Fix
  • Generic (NonEmpty a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.Identity
  • Generic (First a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Monoid
  • Generic (Last a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Monoid
  • Generic (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Dual a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Endo a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Product a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Sum a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (ZipList a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Functor.ZipList
  • Generic (Par1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (GenClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic (GenStackField b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic (GenStackFrame b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic (GenStgStackClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.Closures
  • Generic (Maybe a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (TyVarBndr flag)Defined in ghc-internal-9.1401.0 · GHC.Internal.TH.Syntax
  • Generic (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJ
  • Generic (Maybe a)Defined in strict-0.5.1 · Data.Strict.Maybe
  • Generic (a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic [a]Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (WrappedMonad m a)Defined in base-4.22.0.0 · Control.Applicative
  • Generic (Arg a b)Defined in base-4.22.0.0 · Data.Semigroup
  • Generic (Either a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (U1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (V1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Either a b)Defined in strict-0.5.1 · Data.Strict.Either
  • Generic (These a b)Defined in strict-0.5.1 · Data.Strict.These
  • Generic (Pair a b)Defined in strict-0.5.1 · Data.Strict.Tuple
  • Generic (These a b)Defined in these-1.2.1 · Data.These
  • Generic (Lift f a)Defined in transformers-0.6.1.2 · Control.Applicative.Lift
  • Generic (MaybeT m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Maybe
  • Generic (a, b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (WrappedArrow a b c)Defined in base-4.22.0.0 · Control.Applicative
  • Generic (Biap bi a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Biap
  • Generic (Fix p a)Defined in bifunctors-5.6.3 · Data.Bifunctor.Fix
  • Generic (Join p a)Defined in bifunctors-5.6.3 · Data.Bifunctor.Join
  • Generic (Kleisli m a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.Arrow
  • Generic (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.Const
  • Generic (Ap f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Monoid
  • Generic (Alt f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.Internal
  • Generic (Rec1 f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec Double p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec Float p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec Int p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec Word p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (URec (Ptr ()) p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Tagged s b)Defined in tagged-0.8.11 · Data.Tagged
  • Generic (These1 f g a)Defined in these-1.2.1 · Data.Functor.These
  • Generic (Backwards f a)Defined in transformers-0.6.1.2 · Control.Applicative.Backwards
  • Generic (AccumT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Accum
  • Generic (ExceptT e m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Except
  • Generic (IdentityT f a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Identity
  • Generic (ReaderT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Reader
  • Generic (SelectT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Select
  • Generic (StateT s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.State.Lazy
  • Generic (StateT s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.State.Strict
  • Generic (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.CPS
  • Generic (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Lazy
  • Generic (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Strict
  • Generic (Constant a b)Defined in transformers-0.6.1.2 · Data.Functor.Constant
  • Generic (Reverse f a)Defined in transformers-0.6.1.2 · Data.Functor.Reverse
  • Generic (a, b, c)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Product f g a)Defined in base-4.22.0.0 · Data.Functor.Product
  • Generic (Sum f g a)Defined in base-4.22.0.0 · Data.Functor.Sum
  • Generic (K1 i c p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (ContT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Cont
  • Generic ((:*:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic ((:+:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Compose f g a)Defined in base-4.22.0.0 · Data.Functor.Compose
  • Generic (Clown f a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Clown
  • Generic (Flip p a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Flip
  • Generic (Joker g a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Joker
  • Generic (WrappedBifunctor p a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Wrapped
  • Generic (M1 i c f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.CPS
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.Lazy
  • Generic (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.Strict
  • Generic ((:.:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Product f g a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Product
  • Generic (Sum p q a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Sum
  • Generic (a, b, c, d, e, f)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Tannen f p a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Tannen
  • Generic (a, b, c, d, e, f, g)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (Biff p f g a b)Defined in bifunctors-5.6.3 · Data.Bifunctor.Biff
  • Generic (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
  • Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics