!س?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > Safe.HUVNone 1=>?@AMUVXkDE generic-dataGeneric representation of ? 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 @ and ?.. Two restrictions require the user's caution:The @O instances of the field types need to start enumerating from 0. Particularly A[ is an unfit field type, because the enumeration of the negative values starts before 0. There can only be up to B :: AQ values (because the implementation represents the cardinality explicitly as an A). This restriction makes C 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 D instance (defined by a). The values from different constructors are enumerated sequentially; they are not interleaved. 2data Example = C0 Bool Bool | C1 Bool deriving (E, D, F, G) 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 @L 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 @ types.The optsG parameter is a type-level option to select different implementations.  generic-dataGeneric H generated with the  option.  instance @ MyType where H =   I =   J =   K =  L =  M =   generic-dataGeneric I generated with the  option. See also  .  generic-dataGeneric J generated with the  option. See also  . generic-dataGeneric K generated with the  option. See also  . generic-dataGeneric L generated with the  option. See also  . generic-dataGeneric M generated with the  option. See also  . generic-dataGeneric H generated with the  option.  instance @ MyType where H =  I =  J =  K =  L =  M =   generic-dataGeneric I generated with the  option. See also . generic-dataGeneric J generated with the  option. See also . generic-dataGeneric K generated with the  option. See also . generic-dataGeneric L generated with the  option. See also . generic-dataGeneric M generated with the  option. See also . generic-dataUnsafe generic HC. Does not check whether the argument is within valid bounds. Use   or  instead. generic-dataGeneric H. Use   or  instead. generic-dataGeneric I. Use   or  instead. generic-data genumMin == gfromEnum gminBound generic-data genumMax == gfromEnum gmaxBound generic-dataGeneric J. Use   or  instead. generic-dataGeneric K. Use  or  instead. generic-dataGeneric L. Use  or  instead. generic-dataGeneric M. Use  or  instead.  generic-dataGeneric N.  instance ? MyType where N =   B = ! ! generic-dataGeneric B. See also  .    !  !  Safe -.>HUVXkH, generic-dataArity of a constructor.- generic-data&Number of constructors of a data type.. generic-data&Number of constructors of a data type./ generic-dataArity of a constructor.,-./-.,/Safe-.=>?HUVXkk"0 generic-data Remove an O type constructor.1 generic-dataA placeholder for P values.2 generic-data Inferred strictness of a field (Q).3 generic-data"Strictness annotation of a field (Q).4 generic-data$Unpackedness annotation of a field (Q).5 generic-data;Name of the record field; undefined for non-record fields (Q).6 generic-dataJust- the name of the record field, if it is one (Q).7 generic-dataTrue for a record constructor (R).8 generic-dataFixity of the constructor (R).9 generic-dataName of the constructor (R).: generic-dataTrue if the data type is a newtype (S).; generic-data4Name of the package where the data type is defined (S)< generic-data3Name of the module where the data type is defined (S)= generic-dataName of the data type (S).> generic-dataP field of the O type constructor.? generic-data:Generic representations that contain constructor metadata.G generic-dataConstraint synonym for G and ?.H generic-data'An opaque identifier for a constructor.J generic-data7Generic representations that contain datatype metadata.O generic-data9Name of the first data constructor in a type as a string. O @(T AnyType) = "Maybe" P generic-data?Name of the module where the first type constructor is defined. P @(T AnyType) = "GHC.Base" Q generic-data@Name of the package where the first type constructor is defined. Q @(T AnyType) = "base" R generic-dataU, if the first type constructor is a newtype.T generic-data)Name of the first constructor in a value. T (V 0) = "Just" U generic-data$The fixity of the first constructor. U (V 0) = W U ([] :*: id) = X Y 6 V generic-dataU if the constructor is a record. V (V 0) = Z V ( 0) = U -- newtype  a = Sum { getSum :: a } W generic-dataNumber of constructors. W @(T AnyType) = 2 X generic-dataIndex of a constructor. X Nothing = 0 X (Just "test") = 1 Y generic-dataIdentifier of a constructor.Z generic-data8Index of a constructor, given its identifier. See also X.[ generic-data Name of a constructor. See also T.\ generic-dataAll constructor identifiers. W @a = length (\ @a) ] generic-data)This must not be called on an empty type.^ generic-data)This must not be called on an empty type.50123456789:;<=>?@ABDCEFGHIJNMLKOPQRSTUVWXYZ[\]^_`abcd5OPQRSJNMLKTUVWXHIYZ[\]^GEF_`abcd?@ABDC>=<;:9876543210None ,.=>?HUVsco generic-dataUse r instead.q generic-dataThe type wrapped by a newtype. *newtype Foo = Foo { bar :: Bar } deriving G -- Old Foo ~ Bar r generic-data(Class of newtypes. There is an instance r a if and only if a" is a newtype and an instance of G.s generic-dataGeneric newtype destructor.t generic-dataGeneric newtype constructor.nopqrstrqponstNoneM}v generic-dataA higher-kinded version of y.y 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 (E, D, [, F)) 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. vwxyz{|}~ |}~yz{vwxSafe ,.=>?@AUVfg generic-dataGeneric representation of _ types. generic-dataGeneric representation of F types. generic-dataGeneric `.  instance F MyType where ` =   generic-dataGeneric a.None 456>HMVk generic-dataSynthetic data type.A wrapper to view a generic bL 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->Hz 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 (c).  instance E MyType where (c) =   generic-dataGeneric d.  instance D MyType where d =   generic-dataGeneric (e) (or f).  instance g MyType where (e) =   See also . generic-dataGeneric h.  instance i MyType where h =   generic-dataGeneric (e) (or f).The difference from  is the i constraint instead of g#, for older versions of base where g is not a superclass of i. generic-dataGeneric j.  instance k MyTypeF where j =   generic-dataGeneric (l). See also . generic-dataGeneric m.  instance n MyTypeF where m =  (o) =   generic-dataGeneric (o) (or ). See also . generic-dataGeneric p. See also . generic-dataGeneric q.  instance r MyTypeF where q =  (s) =   generic-data Generic (s). See also . generic-dataGeneric t.  instance u MyTypeF where t =   generic-dataGeneric v.  instance u MyTypeF where v =   See also . generic-dataGeneric w.  instance x MyTypeF where w =   generic-dataGeneric y.  instance x MyTypeF where y =   See also . generic-dataGeneric z. generic-dataGeneric {. None>HV generic-data Type with instances derived via |. generic-data Type with @ instance derived via G with  option. generic-data Type with instances derived via G. generic-dataThis uses the g instance of the wrapped type a to define f-. The purpose of this instance is to derive h3, while remaining consistent with possibly custom g instances. NoneC]  !23456789:;<=>?GHJOPQRTUVWXYZ[\rstvwxyz{|}~]  !|}~yz{vwxrtsOPQRJTUVWXG?HYZ[\>=<;:98765432 None1MUVfNoneUV None-.=>?@AHUVXց 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.1This is a defunctionalized symbol, applied using * or .. generic-datafUnify the "spines" of two generic representations (the "spine" is everything except the field types). generic-dataClosed type family for . generic-data?Define a function for a fixed set of strings, and fall back to f for the others. generic-dataConstant function.  generic-data1Empty function (compile-time error when applied).! generic-dataIdentity function } -> }." 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 " "foo" = "bar" $ 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 * or ..& 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 * or ..' 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 * or ..) 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 R to Z and forget field names.1This is a defunctionalized symbol, applied using * or ..* generic-data-Apply a microsurgery represented by a symbol s> (declared as a dummy data type) to a generic representation f.+ generic-dataSee ... generic-dataApply a microsurgery s to a type a for  DerivingVia.Example J{-# LANGUAGE DerivingVia #-} -- The constructors must be visible. import Generic.Data.Microsurgery (., +(..), (..), )() data T = T { unT :: Int } deriving F via (. )G T) -- T won't be shown as a record: -- show (T {unT = 3}) == "T 3" 7 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). !"#$%&'()*+,-./01234567.+,-*/0)(12'3456&%$#"! 7NoneV׷ !"$&')*+,-./01234567.+,-*7)/0'12&34$56"! ~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^^_``abcdefghijklmnopqrstuvwxyz{|}~                                         ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : : ; < = > ? @ A B C D E F G H I J K LMNMOPQRMSPQTPUVPUWXYZ[M\M]M^M_M`MaMbZcZdZeZfZghiPQjhkZlZmZnPQopqrstuXvwZxPUyPUz{|{}{~{{{{{{{{{{{{ZPQ+generic-data-0.7.0.0-4R9zKWpCVtQDQ0zIQn6gddGeneric.Data.Internal.CompatGeneric.Data.Internal.EnumGeneric.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 Data.MonoidSum Control.MonadapGeneric.Data.TypesGeneric.Data.Microsurgerybase GHC.TypeNatsDivData.Functor.Classes readPrec1GBounded gMinBound gMaxBound FiniteEnum StandardEnumGEnum gCardinality gFromEnumgToEnumgtoEnum gfromEnum genumFrom genumFromThen genumFromTogenumFromThenTo gtoFiniteEnumgfromFiniteEnumgfiniteEnumFromgfiniteEnumFromThengfiniteEnumFromTogfiniteEnumFromThenTo gtoEnumRaw'gtoEnum' gfromEnum'genumMingenumMax genumFrom'genumFromThen' genumFromTo'genumFromThenTo' gminBound gmaxBound $fGEnumoptsU1$fGEnumopts:+: $fGEnumoptsM1$fGEnumFiniteEnumK1$fGEnumFiniteEnum:*: $fGBounded:*: $fGBounded:+: $fGBoundedK1 $fGBoundedU1 $fGBoundedM1NFields NConstructors nconstructorsnfieldsUnM1 DummyMetaMetaSelStrictnessMetaSelSourceStrictness MetaSelUnpack MetaSelName MetaSelNameMMetaConsRecordMetaConsFixity MetaConsNameMetaDataNewtypeMetaDataPackageMetaDataModule MetaDataNameMetaOf GConstructorsgConIdToStringgConIdgConNum gConFixity gConIsRecordGConId ConstructorsConId GDatatype gDatatypeName gModuleName gPackageName gIsNewtype gdatatypeName gmoduleName gpackageName gisNewtype fromDatatypegconName gconFixity gconIsRecordgconNum gconIndexconId conIdToInt conIdToString conIdEnumconIdMinconIdMax gConIdToInttoConId fromConIdreGConId gConIdMin gConIdMax$fGDatatype->M1$fGConstructorskM1$fGConstructorsk:+:$fGConstructorskM10$fConstructorsa $fEqConId $fOrdConId $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 gprecShowsgliftShowsPrecgLiftPrecShows $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 gliftCompare Generically1unGenerically1FiniteEnumerationunFiniteEnumeration Generically unGenerically$fBoundedGenerically$fEnumGenerically$fMonoidGenerically$fSemigroupGenerically$fShowGenerically$fOrdGenerically$fEqGenerically$fGenericGenerically$fEnumFiniteEnumeration$fGenericFiniteEnumeration$fTraversableGenerically1$fFoldableGenerically1$fAlternativeGenerically1$fApplicativeGenerically1$fFunctorGenerically1$fShowGenerically1$fShow1Generically1$fOrdGenerically1$fOrd1Generically1$fEqGenerically1$fEq1Generically1$fGeneric1TYPEGenerically1$fGenericGenerically1 $fOrd1:.:$fEq1:.: $fOrd1Par1 $fEq1Par1 $fOrd1Rec1 $fEq1Rec1 $fOrd1:+:$fEq1:+: $fOrd1:*:$fEq1:*:$fOrd1K1$fEq1K1$fOrd1U1$fEq1U1$fOrd1V1$fEq1V1$fOrd1M1$fEq1M1 DOnFields GOnFieldsOnFieldsUnifyRepSRename'SRenameSConstSErrorSId@@GRenameConstrs RenameConstrs GRenameFields RenameFieldsTypeage GDerecordify DerecordifyGSurgerySurgery' unSurgery'Surgery derecordify underecordifytypeage untypeage renameFieldsunrenameFields renameConstrsunrenameConstrsonData$fGenericSurgery'$fUnifyRepkV1g'$fUnifyRepkU1g'$fUnifyRepkK1g'$fUnifyRepk:*:g'$fUnifyRepk:+:g'$fUnifyRepkM1g'GHC.EnumBoundedEnumghc-prim GHC.TypesIntmaxBoundWord GHC.ClassesOrdEqGHC.ShowShow GHC.GenericsGenerictoEnumfromEnumenumFrom enumFromThen enumFromToenumFromThenTominBoundM1MetaMetaSelMetaConsMetaData GHC.MaybeMaybeTrueJustPrefixInfixRightAssociativeFalseGHC.ReadReadEq1Ord1Read1Show1 showsPrec liftShowsPrecRep==compareGHC.Base<>mappend SemigroupmemptyMonoidfmapFunctor<$pure Applicative<*>liftA2empty Alternative<|> Data.FoldablefoldMapFoldablefoldrData.Traversabletraverse Traversable sequenceAliftEq liftCompareGeneric1Symbol