h&$B!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab Safe-Inferred )1<=?cdefghij Safe-Inferred )1<=? strongweakGet either the strong or weak representation of a type, depending on the type-level "switch" provided.6This is intended to be used in data types that take a 7 type. Define your type using strong fields wrapped in SW s. You then get the weak representation for free, using the same definition. data A (s :: Strength) = A { a1 :: SW s Word8 , a2 :: String }  strongweak,Strength enumeration: is it strong, or weak?:Primarily interesting at the type level (using DataKinds). strongweak Transform an a to a  a.A given strong type a& has exactly one associated weak type  a9. Multiple strong types may weaken to the same weak type.The following laws must hold:  a == b |=  a ==  b round-trip:  strengthen ( a) == k aMost instances should strip an invariant, and not have a recursive context. Some types don't have an invariant either( handle an invariant, or decompose. See  Strongweak! for a discussion on this design. strongweakThe type to weaken to. strongweak4Transform a strong value to its associated weak one. strongweak=Lift a function on a weak type to the associated strong type. strongweak%Decomposer. Weaken either side of an l.  strongweak,Decomposer. Weaken both elements of a tuple.  strongweak+Decomposer. Weaken every element in a list. strongweakStrip wrapper. strongweakStrip wrapper. strongweak&Weaken sized vectors into plain lists. strongweak(Weaken non-empty lists into plain lists. strongweakStrip refined type refinement. Safe-Inferred )1<=?0  strongweakUnsafely transform a  a to an a, without asserting invariants..For example, you may unsafely strengthen some  n into a m? by unsafely coercing the value, ignoring the possibility that n >= 255.What happens if it turns out you're lying to the computer and your weak value doesn't fit in its strong counterpart? That depends on the strengthen.)Numeric coercions should safely overflow.Some will raise an error (e.g. n).Others will appear to work, but later explode your computer (sized vectors will probably do this).Only consider using this if you have a guarantee that your value is safe to treat as strong.Instances should either( handle an invariant, or decompose. See  Strongweak! for a discussion on this design. strongweak=Unsafely transform a weak value to its associated strong one. strongweak2Decomposer. Unsafely strengthen either side of an l. strongweak9Decomposer. Unsafely strengthen both elements of a tuple. strongweak8Decomposer. Unsafely strengthen every element in a list.% strongweak Add wrapper.& strongweak Add wrapper.' strongweak Assume the size of a plain list.( strongweak!Assume a plain list is non-empty.) strongweakAdd a refinement to a type without checking the associated predicate. Safe-Inferred")1<=?P * strongweakStrengthen failure data type. Don't use these constructors directly, use the existing helper functions.Field indices are from 0 in the respective constructor. Field names are provided if present.- strongweakYou may attempt to transform a  a to an a.Laws:  a === b -> . a === . b . ( a) === o aWe take  as a superclass in order to maintain strong/weak type pair consistency. We choose this dependency direction because we treat the strong type as the "canonical" one, so ; is the more natural (and straightforward) class to define.Instances should either( handle an invariant, or decompose. See  Strongweak! for a discussion on this design.. strongweak?Attempt to transform a weak value to its associated strong one./ strongweak0Weaken a strong value, then strengthen it again.0Potentially useful if you have previously used  4 and now wish to check the invariants. For example:7restrengthen $ unsafeStrengthen @(Vector 2 Natural) [0] Failure ...5 strongweak)Decomposer. Strengthen either side of an l.6 strongweak0Decomposer. Strengthen both elements of a tuple.7 strongweak/Decomposer. Strengthen every element in a list.@ strongweak Add wrapper.A strongweak Add wrapper.B strongweakStrengthen a plain list into a sized vector by asserting length.C strongweakStrengthen a plain list into a non-empty list by asserting non-emptiness.D strongweak$Assert a predicate to refine a type.+ strongweak weak type strongweak strong type strongweak weak value strongweakmsg,  strongweakweak datatype name strongweakstrong datatype name strongweakweak constructor name strongweakstrong constructor name strongweakweak field index strongweakweak field name (if present) strongweakstrong field index strongweakstrong field name (if present) strongweakfailures *+,-./012 -.*+,01/2 Safe-Inferred )1<=?F strongweak4Generic strengthening at the selector product level.In order to calculate field indices, we return the current field index alongside the result. This way, the product case can strengthen the left branch, then increment the returned field index and use it for strengthening the right branch.H strongweak3Generic strengthening at the constructor sum level.J strongweak,Generic strengthening at the datatype level.L strongweakStrengthen a value generically."The weak and strong types must be  compatible. See   6 for the definition of compatibility in this context.M strongweak.Get the record name for a selector if present.On the type level, a 'Maybe Symbol' is stored for record names. But the reification is done using  fromMaybe "". So we have to inspect the resulting string to determine whether the field uses record syntax or not. (Silly.)N strongweakp? without the value (only used as a proxy). Lets us push our qs into one place.O strongweakr? without the value (only used as a proxy). Lets us push our qs into one place.P strongweaks? without the value (only used as a proxy). Lets us push our qs into one place.Q strongweak?Strengthen sum types by casing and strengthening left or right.R strongweak"Nothing to do for empty datatypes.S strongweak1Enter a datatype, stripping its metadata wrapper.T strongweak&Strengthen a field using the existing - instance.U strongweakSpecial case: if source and target types are equal, copy the value through.V strongweak9Strengthen product types by strengthening left and right.This is ordered (left then right) in order to pass the field index along.W strongweak%Nothing to do for empty constructors.X strongweak4Enter a constructor, stripping its metadata wrapper.G strongweakweak datatype name strongweakstrong datatype name strongweakweak constructor name strongweakstrong constructor name strongweak"current field index (0, from left) FGHIJKLMNOP LJKHIFGMNOP Safe-Inferred )1<=?!e[ strongweakWeaken a value generically."The weak and strong types must be  compatible. See   6 for the definition of compatibility in this context.\ strongweak7Weaken sum types by casing and weakening left or right.] strongweak1Weaken product types by weakening left and right.^ strongweak"Weaken a field using the existing  instance._ strongweakSpecial case: if source and target types are equal, copy the value through.` strongweak%Nothing to do for empty constructors.a strongweak"Nothing to do for empty datatypes.b strongweakStrip all meta.YZ[[YZ  Safe-Inferred )1<=?!L[[L  Safe-Inferred )1<=?!*+,-./012  !"#$ %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxvyzv{|vw}~vvvvstrongweak-0.4.0-inplaceStrongweak.WeakenStrongweak.Strengthen.UnsafeStrongweak.StrengthenStrongweak.Generic.StrengthenStrongweak.Generic.WeakenPaths_strongweakNumeric.NaturalNaturalunsafeStrengthen StrongweakGenericStrongweak.GenericSWStrengthStrongWeakWeakenweaken liftWeakF$fWeakenEither $fWeaken(,) $fWeaken[] $fWeakenInt64 $fWeakenInt32 $fWeakenInt16 $fWeakenInt8$fWeakenWord64$fWeakenWord32$fWeakenWord16 $fWeakenWord8 $fWeakenConst$fWeakenIdentity$fWeakenVector$fWeakenNonEmpty$fWeakenRefinedUnsafeStrengthen$fUnsafeStrengthenEither$fUnsafeStrengthen(,)$fUnsafeStrengthen[]$fUnsafeStrengthenInt64$fUnsafeStrengthenInt32$fUnsafeStrengthenInt16$fUnsafeStrengthenInt8$fUnsafeStrengthenWord64$fUnsafeStrengthenWord32$fUnsafeStrengthenWord16$fUnsafeStrengthenWord8$fUnsafeStrengthenConst$fUnsafeStrengthenIdentity$fUnsafeStrengthenVector$fUnsafeStrengthenNonEmpty$fUnsafeStrengthenRefinedStrengthenFailStrengthenFailBaseStrengthenFailField Strengthen strengthen restrengthenstrengthenFailPrettystrengthenFailBasestrengthenBounded$fPrettyStrengthenFail$fShowStrengthenFail$fStrengthenEither$fStrengthen(,)$fStrengthen[]$fStrengthenInt64$fStrengthenInt32$fStrengthenInt16$fStrengthenInt8$fStrengthenWord64$fStrengthenWord32$fStrengthenWord16$fStrengthenWord8$fStrengthenConst$fStrengthenIdentity$fStrengthenVector$fStrengthenNonEmpty$fStrengthenRefined$fEqStrengthenFail GStrengthenS gstrengthenS GStrengthenC gstrengthenC GStrengthenD gstrengthenDstrengthenGeneric selName''conName' datatypeName'selName'$fGStrengthenCk:+::+:$fGStrengthenCkV1V1$fGStrengthenDkM1M1$fGStrengthenSkM1M1$fGStrengthenSkM1M10$fGStrengthenSk:*::*:$fGStrengthenSkU1U1$fGStrengthenCkM1M1GWeakengweaken weakenGeneric$fGWeakenk:+::+:$fGWeakenk:*::*:$fGWeakenkK1K1$fGWeakenkK1K10$fGWeakenkU1U1$fGWeakenkV1V1$fGWeakenkM1M1versiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirbaseGHC.Basepure Data.EitherEitherGHC.WordWord8NonEmpty#either-5.0.2-3Nf60S59kxtDLiV9phReneData.Either.ValidationSuccess GHC.GenericsconNameGHC.Err undefined datatypeNameselName