!g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefSafe.HUVNone 1=>?@AMUVXkS  generic-dataGeneric representation of g types. generic-dataGeneric representation of h types.  generic-data Extends the   option for  j to allow all constructors to have arbitrary many fields. Each field type must be an instance of both i and h.Details,Two restrictions require the user's caution:The iO instances of the field types need to start enumerating from 0. Particularly j[ is an unfit field type, because the enumeration of the negative values starts before 0. There can only be up to k :: jQ values (because the implementation represents the cardinality explicitly as an j). This restriction makes l an invalid field type. Notably, it is insufficient for each individual field types to stay below this limit. Instead it applies to the generic type as a whole.The resulting  " instance starts enumerating from 0 up to (cardinality - 1) and respects the generic m instance (defined by a). The values from different constructors are enumerated sequentially; they are not interleaved. 2data Example = C0 Bool Bool | C1 Bool deriving (n, m, o, p) cardinality = 6 -- 2 * 2 + 2 -- Bool * Bool | Bool enumeration = [ C0 False False , C0 False True , C0 True False , C0 True True , C1 False , C1 True ] enumeration == map  [0 .. 5] [0 .. 5] == map  enumeration  generic-dataStandard option for   : derive iL for types with only nullary constructors (the same restrictions as in the  Phttps://www.haskell.org/onlinereport/haskell2010/haskellch11.html#x18-18400011.2Haskell 2010 report).  generic-dataGeneric representation of i types.The optsG parameter is a type-level option to select different implementations. generic-dataGeneric q generated with the   option.  instance i MyType where q =  r =  s =  t =  u =  v =   generic-dataGeneric r generated with the   option. See also . generic-dataGeneric s generated with the   option. See also . generic-dataGeneric t generated with the   option. See also . generic-dataGeneric u generated with the   option. See also . generic-dataGeneric v generated with the   option. See also . generic-dataGeneric q generated with the   option.  instance i MyType where q =  r =  s =  t =  u =  v =   generic-dataGeneric r generated with the   option. See also . generic-dataGeneric s generated with the   option. See also . generic-dataGeneric t generated with the   option. See also . generic-dataGeneric u generated with the   option. See also . generic-dataGeneric v generated with the   option. See also . generic-dataUnsafe generic qC. Does not check whether the argument is within valid bounds. Use  or  instead. generic-dataGeneric q. Use  or  instead. generic-dataGeneric r. Use  or  instead. generic-data genumMin == gfromEnum gminBound generic-data genumMax == gfromEnum gmaxBound  generic-dataGeneric s. Use  or  instead.! generic-dataGeneric t. Use  or  instead." generic-dataGeneric u. Use  or  instead.# generic-dataGeneric v. Use  or  instead.$ generic-dataGeneric w.  instance h MyType where w = $ k = % % generic-dataGeneric k. See also $.& generic-dataGeneric x. import Data.Ix instance g MyType where x = & y = ' z = ) ' generic-dataGeneric y. See also &.( generic-dataGeneric  unsafeIndex.DetailsThe functions  unsafeIndex and unsafeRangeSize belong to gA but are internal to GHC and hence not exported from the module Data.Ix-. However they are exported from the module GHC.Arr. See &" for how to define an instance of g such that it does not depend on the stability of GHCs internal API. Unfortunately this results in additional (unnecessary) bound checks. With the danger of having no stability guarantees for GHC's internal API one can alternatively define an instance of g as import GHC.Arr instance g MyType where x = & unsafeIndex = ( z = ) ) generic-dataGeneric z. See also &.(  !"#$%&'()( !"#$%&'()  Safe ,.=>?@AHUVZD9 generic-data":set -XDeriveGeneric -XDerivingVia%import Generic.Data (Generically(..)):{ data AB = A | B deriving stock Generic) deriving Semigroup via Generically AB:}...= " Cannot derive Semigroup instance for AB due to sum type3 " When deriving the instance for (Semigroup AB)9:;;:9Safe -.>HUVXk]> generic-dataArity of a constructor.? generic-data&Number of constructors of a data type.@ generic-data&Number of constructors of a data type.A generic-dataArity of a constructor.>?@A?@>ASafe-.=>?@AHUVXk~$B generic-data Remove an { type constructor.C generic-dataA placeholder for | values.D generic-data Inferred strictness of a field (}).E generic-data"Strictness annotation of a field (}).F generic-data$Unpackedness annotation of a field (}).G generic-data;Name of the record field; undefined for non-record fields (}).H generic-dataJust- the name of the record field, if it is one (}).I generic-dataTrue for a record constructor (~).J generic-dataFixity of the constructor (~).K generic-dataName of the constructor (~).L generic-dataTrue if the data type is a newtype ().M generic-data4Name of the package where the data type is defined ()N generic-data3Name of the module where the data type is defined ()O generic-dataName of the data type ().P generic-data| field of the { type constructor.U generic-data:Generic representations that contain constructor metadata.] generic-data%Constraint synonym for generic types a with a constructor named n.^ generic-dataConstraint synonym for p and U._ generic-data'An opaque identifier for a constructor.a generic-data7Generic representations that contain datatype metadata.f generic-data9Name of the first data constructor in a type as a string.gdatatypeName @(Maybe Int)"Maybe"g generic-data?Name of the module where the first type constructor is defined.gmoduleName @(ZipList Int)"Control.Applicative"h generic-data@Name of the package where the first type constructor is defined.gpackageName @(Maybe Int)"base"i generic-data, if the first type constructor is a newtype.gisNewtype @[Int]FalsegisNewtype @(ZipList Int)Truek generic-data)Name of the first constructor in a value.gconName (Just 0)"Just"l generic-data$The fixity of the first constructor.gconFixity (Just 0)PrefixgconFixity ([] :*: id)Infix RightAssociative 6m generic-data if the constructor is a record.gconIsRecord (Just 0)FalseDgconIsRecord (Sum 0) -- Note: newtype Sum a = Sum { getSum :: a }Truen generic-dataNumber of constructors.gconNum @(Maybe Int)2o generic-dataIndex of a constructor.gconIndex Nothing0gconIndex (Just "test")1p generic-dataIdentifier of a constructor.q generic-data8Index of a constructor, given its identifier. See also o.r generic-data Name of a constructor. See also k.s generic-dataFAll constructor identifiers. This must not be called on an empty type. n @a = length (s @a) t generic-data)This must not be called on an empty type.u generic-data)This must not be called on an empty type.v generic-dataGet a _ by name.*conIdNamed @"Nothing" :: ConId (Maybe Int)ConId 0*conIdNamed @"Just" :: ConId (Maybe Int)ConId 1;BCDEFGHIJKLMNOPQRSTUVWXZY[\]^_`aedcbfghijklmnopqrstuvwxyz{|;fghijaedcbklmno_`pqrstuv^][\wxyz{|UVWXZYTSRQPONMLKJIHGFEDCBNone ,.=>?HUV1 generic-dataUse  instead. generic-dataThe type wrapped by a newtype. *newtype Foo = Foo { bar :: Bar } deriving p -- Old Foo ~ Bar  generic-data(Class of newtypes. There is an instance  a if and only if a" is a newtype and an instance of p. generic-dataGeneric newtype destructor. generic-dataGeneric newtype constructor.NoneMx generic-dataA higher-kinded version of . generic-datapA newtype with trivial instances, that considers every value equivalent to every other one, and shows as just "_". generic-data.A newtype whose instances for simple classes (n, m, , o)) use higher-kinded class instances for f (, , , ). generic-data Shown as "_". generic-data All equal. generic-data All equal. generic-data Shown as "_". generic-data All equal. generic-data All equal. generic-data Shown as "_". generic-data All equal. generic-data All equal. generic-data Shown as "_". generic-data All equal. generic-data All equal. Safe ,.=>?@AUVf5 generic-dataGeneric representation of  types. generic-dataGeneric representation of o types. generic-dataGeneric .  instance o MyType where  =   generic-dataGeneric . None 456>HMVk generic-dataSynthetic data type.A wrapper to view a generic L as the datatype it's supposed to represent, without needing a declaration. generic-datadConversion between a generic type and the synthetic type made using its representation. Inverse of . generic-data Inverse of . None->Hfh generic-dataRConvert between types with representationally equivalent generic representations. generic-dataCompose  with a binary operation. generic-data'Coerce while preserving the type index. generic-dataElimination of V1. generic-data#A helper for better type inference. generic-data#A helper for better type inference. generic-data$Lift binary combinators generically. None>) generic-dataGeneric ().  instance n MyType where () =   generic-dataGeneric .  instance m MyType where  =   generic-dataGeneric () (or ).  instance  MyType where () =   See also . generic-dataGeneric .  instance  MyType where  =   generic-dataGeneric () (or ).The difference from  is the  constraint instead of #, for older versions of base where  is not a superclass of . generic-dataGeneric .  instance  MyTypeF where  =   generic-dataGeneric (). See also . generic-dataGeneric .  instance  MyTypeF where  =  () =   generic-dataGeneric () (or ). See also . generic-dataGeneric . See also . generic-dataGeneric .  instance  MyTypeF where  =  () =   generic-data Generic (). See also . generic-dataGeneric .  instance  MyTypeF where  =   generic-dataGeneric .  instance  MyTypeF where  =   See also . generic-dataGeneric .  instance  MyTypeF where  =   generic-dataGeneric .  instance  MyTypeF where  =   See also . generic-dataGeneric . generic-dataGeneric . None>HVΑ generic-data'Product type with generic instances of  and .This is similar to  in most cases, but  also works for types T with deriving via  U, where U< is a generic product type coercible to, but distinct from T. In particular, U may not have an instance of , which  requires.Example":set -XDeriveGeneric -XDerivingVia)data Point a = Point a a deriving Generic:{% newtype Vector a = Vector (Point a) deriving (Semigroup, Monoid)( via GenericProduct (Point (Sum a)):} If it were via  (Point (Sum a)) instead, then Vector's  (the  method) would be defined as Point's () (the @ method), which might not exist, or might not be equivalent to Vector 's generic $ instance, which would be unlawful. generic-data Type with instances derived via .  generic-data Type with i instance derived via p with   option.  generic-data Type with instances derived via p. generic-dataThis uses the  instance of the wrapped type a to define -. The purpose of this instance is to derive 3, while remaining consistent with possibly custom  instances.            None'h $%&'()DEFGHIJKLMNOPU]^_afghiklmnopqrsv     h  $%&')(     fghiaklmno^U_pqrsv]PONMLKJIHGFED None1MUVfNoneUV None-.=>?@AHUVX= generic-data:Change the generic representation to that of another type a.> generic-data7Apply a type constructor to every field type of a type a to make a synthetic type.@ generic-dataApply a type constructor f2 to every field type of a generic representation r. data Color = RGB { r :: Int , g :: Int , b :: Int } -- becomes -- data Color f = RGB { r :: f Int , g :: f Int , b :: f Int }1This is a defunctionalized symbol, applied using O or T.A generic-datafUnify the "spines" of two generic representations (the "spine" is everything except the field types).B generic-dataClosed type family for C.C generic-data?Define a function for a fixed set of strings, and fall back to f for the others.D generic-dataConstant function.E generic-data1Empty function (compile-time error when applied).F generic-dataIdentity function  -> .G generic-dataf @@ s; is the application of a type-level function symbolized by f to a s :: . A function FooToBar can be defined as follows: %data FooToBar type instance FooToBar G "foo" = "bar" I generic-data'Rename constructors using the function rnm given as a parameter. ddata Foo = Bar { baz :: Zap } -- becomes, renaming "Bar" to "Car" -- data Foo = Car { baz :: Zap }1This is a defunctionalized symbol, applied using O or T.K generic-data!Rename fields using the function rnm given as a parameter. ddata Foo = Bar { baz :: Zap } -- becomes, renaming "baz" to "bag" -- data Foo = Bar { bag :: Zap }1This is a defunctionalized symbol, applied using O or T.L generic-dataForget that a type is a newtype=. (The pun is that "aging" a type makes it no longer "new".) 8newtype Foo = Bar Baz -- becomes -- data Foo = Bar Baz1This is a defunctionalized symbol, applied using O or T.N generic-data4Forget that a type was declared using record syntax. @data Foo = Bar { baz :: Zap } -- becomes -- data Foo = Bar Zap"Concretely, set the last field of ~ to  and forget field names.1This is a defunctionalized symbol, applied using O or T.O generic-data-Apply a microsurgery represented by a symbol s> (declared as a dummy data type) to a generic representation f.P generic-dataSee T.S generic-dataApply a microsurgery s to a type a for  DerivingVia for the  class.T generic-dataApply a microsurgery s to a type a for  DerivingVia.For the  class, see S.Example J{-# LANGUAGE DerivingVia #-} -- The constructors must be visible. import Generic.Data.Microsurgery (T, P(..),  (..), N() data T = T { unT :: Int } deriving o via (T NG T) -- T won't be shown as a record: -- show (T {unT = 3}) == "T 3" ] generic-data [onData :: _ => (Data r x -> Data s y) -> (Data r x -> Data s y) -- possible specializationCan be used with  generic-lens& for type-changing field updates with field_& (and possibly other generic optics).SA specialization of the identity function to be used to fix types of functions on , unifying the "spines" of input and output generic representations (the "spine" is everything except field types, which may thus change).#=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_#TSPQROUVNMWXLYZ[\KJIHGFEDCBA]@?>=^_NoneVK& =>@CDEFGIKLNOPQRSTUVWXYZ[\]^_&TSPQRO ]KYZI[\GFEDC@>=^_LWXNUV !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvvwxyyz{|}~                                          ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J KLMNOPQRSTUVWXYZ[\]^__`abcdefghijklmnopqrstuvwxwyz{|w}z{~zzwwwwwwwuuuz{zzz{z{+generic-data-0.8.2.0-HlKcArH0hmd4BZWLUz2FVDGeneric.Data.Internal.CompatGeneric.Data.Internal.EnumGeneric.Data.Internal.ErrorGeneric.Data.Internal.FunctionsGeneric.Data.Internal.MetaGeneric.Data.Internal.NewtypeGeneric.Data.Internal.ResolversGeneric.Data.Internal.ShowGeneric.Data.Internal.DataGeneric.Data.Internal.UtilsGeneric.Data.Internal.Prelude!Generic.Data.Internal.GenericallyGeneric.Data.Orphans"Generic.Data.Internal.Microsurgery Generic.Datagcompare Control.Monadap GenericallyGeneric.Data.Types Data.MonoidMonoidGeneric.Data.Microsurgerybase GHC.TypeNatsDivData.Functor.Classes readPrec1GIxgRange gUnsafeIndexgInRangeGBounded gMinBound gMaxBound FiniteEnum StandardEnumGEnum gCardinality gFromEnumgToEnumgtoEnum gfromEnum genumFrom genumFromThen genumFromTogenumFromThenTo gtoFiniteEnumgfromFiniteEnumgfiniteEnumFromgfiniteEnumFromThengfiniteEnumFromTogfiniteEnumFromThenTo gtoEnumRaw'gtoEnum' gfromEnum'genumMingenumMax genumFrom'genumFromThen' genumFromTo'genumFromThenTo' gminBound gmaxBoundgrangegindex gunsafeIndexginRange $fGEnumoptsU1$fGEnumopts:+: $fGEnumoptsM1$fGEnumFiniteEnumK1$fGEnumFiniteEnum:*: $fGBounded:*: $fGBounded:+: $fGBoundedK1 $fGBoundedU1$fGIxK1$fGIxU1$fGIx:*:$fGIx:+:$fGIxM1 $fGBoundedM1 AssertNoSumAssertHasSum$fAssertFalsemsg$fAssertTruemsgNFields NConstructors nconstructorsnfieldsUnM1 DummyMetaMetaSelStrictnessMetaSelSourceStrictness MetaSelUnpack MetaSelName MetaSelNameMMetaConsRecordMetaConsFixity MetaConsNameMetaDataNewtypeMetaDataPackageMetaDataModule MetaDataNameMetaOf GConIdNamedIf GConIdNamed' GConIdNamed ConIdNamed' GConstructorsgConIdToStringgConIdgConNum gConFixity gConIsRecordGConId ConIdNamed ConstructorsConId GDatatype gDatatypeName gModuleName gPackageName gIsNewtype gdatatypeName gmoduleName gpackageName gisNewtype fromDatatypegconName gconFixity gconIsRecordgconNum gconIndexconId conIdToInt conIdToString conIdEnumconIdMinconIdMax conIdNamed gConIdToInttoConId fromConIdreGConId gConIdMin gConIdMax$fGDatatype->M1$fGConstructorskM1$fGConstructorsk:+:$fGConstructorskM10$fConstructorsa$fConIdNamedna $fEqConId $fOrdConId $fShowConId $fEqGConId $fOrdGConId NewtypeErrNewtype'GOldOldNewtypeunpackpack $fNewtypeaOpaque1 unOpaque1OpaqueunOpaqueId1unId1 $fShowId1 $fReadId1$fOrdId1$fEqId1 $fShow1Opaque $fOrd1Opaque $fEq1Opaque $fShowOpaque $fOrdOpaque $fEqOpaque$fShow1Opaque1 $fOrd1Opaque1 $fEq1Opaque1 $fShowOpaque1 $fOrdOpaque1 $fEqOpaque1$fEq1Id1 $fOrd1Id1 $fRead1Id1 $fShow1Id1 GShowSinglegPrecShowsSingle GShowNamedgPrecShowsNamed GShowFieldsgPrecShowsFieldsGShowC gPrecShowsCGShow gPrecShowsGShow1 ShowsPrecGShow0 gshowsPrec gprecShowsgliftShowsPrecgLiftPrecShowssurroundConName isSymDataConisSymVar $fGShowpV1 $fGShowp:+: $fGShowpM1 $fGShowpM10$fGShowFieldspU1$fGShowFieldsp:*:$fGShowCpMetaConsf$fGShowNamedpU1$fGShowNamedp:*:$fGShowCpMetaConsf0$fGShowSinglep:.:$fGShowSingleIdentityPar1$fGShowSingleIdentityRec1$fGShowSinglepK1$fGShowNamedpM1$fGShowFieldspM1DataunDatatoDatafromData $fBoundedData $fEnumData $fShow1Data $fShowData$fGeneric1TYPEData $fGenericData $fFunctorData$fFoldableData$fTraversableData$fApplicativeData$fAlternativeData $fMonadData$fMonadPlusData$fContravariantData$fEqData $fOrdData $fEq1Data $fOrd1Data$fSemigroupData $fMonoidDatagcoerce gcoerceBinopcoerce'coerce1absurd1from'to'liftG2geqgmappendgmempty gmappend'gfmap gconstmapgpuregapgliftA2gemptygaltgfoldMapgfoldr gtraverse gsequenceAgliftEq gliftCompareGenericProductunGenericProduct Generically1unGenerically1FiniteEnumerationunFiniteEnumeration unGenerically$fBoundedGenerically$fIxGenerically$fEnumGenerically$fMonoidGenerically$fSemigroupGenerically$fShowGenerically$fOrdGenerically$fEqGenerically$fGenericGenerically$fEnumFiniteEnumeration$fGenericFiniteEnumeration$fTraversableGenerically1$fFoldableGenerically1$fAlternativeGenerically1$fApplicativeGenerically1$fFunctorGenerically1$fShowGenerically1$fShow1Generically1$fOrdGenerically1$fOrd1Generically1$fEqGenerically1$fEq1Generically1$fGeneric1TYPEGenerically1$fGenericGenerically1$fMonoidGenericProduct$fSemigroupGenericProduct$fGenericGenericProduct $fOrd1:.:$fEq1:.: $fOrd1Par1 $fEq1Par1 $fOrd1Rec1 $fEq1Rec1 $fOrd1:+:$fEq1:+: $fOrd1:*:$fEq1:*:$fOrd1K1$fEq1K1$fOrd1U1$fEq1U1$fOrd1V1$fEq1V1$fOrd1M1$fEq1M1CopyRep DOnFields GOnFieldsOnFieldsUnifyRepSRename'SRenameSConstSErrorSId@@GRenameConstrs RenameConstrs GRenameFields RenameFieldsTypeage GDerecordify DerecordifyGSurgerySurgery' unSurgery'ProductSurgerySurgery derecordify underecordifytypeage untypeage renameFieldsunrenameFields renameConstrsunrenameConstrsonDatacopyRep uncopyRep$fGenericSurgery'$fUnifyRepkV1g'$fUnifyRepkU1g'$fUnifyRepkK1g'$fUnifyRepk:*:g'$fUnifyRepk:+:g'$fUnifyRepkM1g'GHC.ArrIxGHC.EnumBoundedEnumghc-prim GHC.TypesIntmaxBoundWord GHC.ClassesOrdEqGHC.ShowShow GHC.GenericsGenerictoEnumfromEnumenumFrom enumFromThen enumFromToenumFromThenTominBoundrangeindexinRangeM1MetaMetaSelMetaConsMetaDataTrueGHC.ReadReadEq1Ord1Read1Show1 showsPrec liftShowsPrecRep==compareGHC.Base<>mappend SemigroupmemptyfmapFunctor<$pure Applicative<*>liftA2empty Alternative<|> Data.FoldablefoldMapFoldablefoldrData.Traversabletraverse Traversable sequenceAliftEq liftCompareGeneric1SymbolFalse