úÎSWMn      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmNone ,69:;<=DRMuch like the  EnumFromTOB class, but defines the "infinite" Prelude Enum functions, namely n and o , as well as ..The only function that needs to be defined is /, default definitions will look after the rest. Much like n from Prelude  Much like o from Prelude Like E, but with an explicit step size, not just the second element given. The ' class defines versions of the Prelude p functions q and rE, as well as other functions which may sometimes be more convienient.^But more importantly, it can produce any structure you define an instance for, not just lists..The only function that needs to be defined is  /, default definitions will look after the rest.kNote that this class does not deal with the infinite list generating functions, you'll need to look at the  class for that.ˆI've attempted to define appropriate instances for any structures in the core GHC distribution, currently lists, arrays and bytestrings. Much like q from Prelude  Much like r from Prelude  This is like <, but instead of a final stopping number, a count is given.  This is like <, but instead of a final stopping number, a count is given.  This is like L, but instead of giving the second element directly, a step size is passed. 6This is a combination of the conviencience changes in  and  .“Instead of having to explicitly state the second element, a "stepsize" is passed, Also, instead of stating the last element, a "count" is passed./I find this tends to be more useful more often. HThis specifies the type of elements of an instance of a class of either  or .)For example, the definition for lists is: type instance Element [a] = a UA little trick for defining the two default cases mentioned in the documentation for . The generic , class. Firstly, this class just deals with , 8 type functions, not the list generating functions like n and q the normal p has.‘This class has a number of defaults for making defining both existing Prelude style Enum classes and ordinary Numeric classes quick and painless.Firstly, for existing Enums: instance Enum BlahWill completely define Blah as an Enum if Blah_ is already a Prelude style Enum, just forwarding calls to the functions in the Prelude's Enum.0Secondly, for integral datatypes (i.e. in class s) .instance Enum Blah type EnumNumT Blah = Blah will defined Blah+ to be an Enum, with it's Enum type itself. For example, 7instance Enum Integer type EnumNumT Integer = Integeris an Enum with  and  simply t.Note that with this approach, toEnum . fromEnum == id, instead of going through u and possibly overflowing.Note also that operations like  and 7 don't bounds check like the Prelude versions often do.ØFor types that don't fit one of the above two categories (i.e. don't have a satisfactory Prelude Enum instance or aren't Integral) you'll have to define the individual functions as discussed with their documentation._Note that the following function, whilst valid with Prelude style enums, is not valid with the  class in this module: IconvertEnum :: (Enum a, Enum b) => a -> b convertEnum = toEnum . fromEnum>because now, Enum's can have different "enum types". That is.  is not always an u, and  does not always take an u.GThough it is debatable if the above function is sensible though anyway.(I have attempted to define instances of M for all types in GHCs included libraries, tell me if I've missed any though.v:This is the "enum" type. It just needs to be in the class w.xx (default - vi): this is a type that represents the number of "steps" between two enums, based on a stepsize. Whilst v must only be a w, x needs to be s. If v is already s% it's almost certainly a good choice.Just like Prelude's y , but with  EnumNumT t instead of u Just like Prelude's z , but with  EnumNumT t instead of u 3: This takes three arguments, firstly, two of type t for some Enum t ("start" and "end", and also "step" of  EnumNumT t, i.e. the "enum" type of t.6The result should be the length of the following list: [start, (start + step) .. end]and also of type EnumIntegralT t. It should not be less than 0. For example: numStepsBetween 'a' 'e' 2 should be 3.q vx{ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm    _   vx{ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm|      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqpqpqpqpqprsptuvwxypz{|pqpq}~*generic-enum-0.1.0.0-KBf94rmo7p8D4SyUJT8AjData.Generic.EnumEnumFromenumFrom enumFromThen enumFromStep EnumFromTo enumFromToenumFromThenTo enumFromCountenumFromThenCountenumFromStepToenumFromStepCountElement DefaultEnumdefaultFromEnum defaultToEnumEnumsuccpredtoEnumfromEnumnumStepsBetween$fEnumFromToShortByteString$fEnumFromToByteString$fEnumFromToByteString0$fEnumFromToArray $fEnumFrom[]$fEnumFromTo[] $fEnumConst $fEnumAlt$fEnumCoercion $fEnum:~: $fEnumProxy$fEnumIdentity $fEnumMin $fEnumMax $fEnumFirst $fEnumLast$fEnumWrappedMonoid $fEnumFixed $fEnumRatio$fEnumGiveGCStats$fEnumDoCostCentres$fEnumDoHeapProfile $fEnumDoTrace $fEnumNatural $fEnumCDev $fEnumCIno $fEnumCMode $fEnumCOff $fEnumCPid $fEnumCSsize $fEnumCGid $fEnumCNlink $fEnumCUid $fEnumCCc $fEnumCSpeed $fEnumCTcflag $fEnumCRLim$fEnumFd $fEnumWordPtr $fEnumIntPtr $fEnumCChar $fEnumCSChar $fEnumCUChar $fEnumCShort $fEnumCUShort $fEnumCInt $fEnumCUInt $fEnumCLong $fEnumCULong $fEnumCLLong $fEnumCULLong $fEnumCFloat $fEnumCDouble$fEnumCPtrdiff $fEnumCSize $fEnumCWchar$fEnumCSigAtomic $fEnumCClock $fEnumCTime$fEnumCUSeconds$fEnumCSUSeconds $fEnumCIntPtr$fEnumCUIntPtr $fEnumCIntMax$fEnumCUIntMax$fEnumSeekMode$fEnumAssociativity$fEnumSourceUnpackedness$fEnumSourceStrictness$fEnumDecidedStrictness $fEnumIOMode$fEnumGeneralCategory$fEnum() $fEnumWord64 $fEnumWord32 $fEnumWord16 $fEnumWord8$fEnumOrdering $fEnumInteger $fEnumInt64 $fEnumInt32 $fEnumInt16 $fEnumInt8 $fEnumInt $fEnumChar $fEnumBool$fDefaultEnumIntInt$fDefaultEnumaa$fDefaultEnumaIntbaseGHC.EnumGHC.RealIntegralGHC.Baseidghc-prim GHC.TypesIntEnumNumTGHC.NumNum EnumIntegralTbyteStringUnfoldrN