úÎyªuú+      !"#$%&'()* Safe-Inferred0+$ without the (internal) fingerprint.!Package, module, constructor name,$ without the (internal) fingerprint.QDifferent ways of including/verifying type information of serialized messages./Compare the full representation of a data type.More verbose than Hashed and A. As a rule of thumb, transmitted data is roughly the same as D, but all names are fully qualified (package, module, type name).uCorrect comparison (no false positives). An semi-exception here is when types change between package versions: package-1.0 Foo.X and package-1.1 Foo.X count as the same type.aUseful type errors ("expected X, received Y"). All types are shown unqualified though, making Foo.X and Bar.Xz look identical in error messages. Remember this when you get a seemingly silly error "expected Foo, but given Foo".Compare -/ representation of types, obtained by calling . on the ', and also include a hash value (like f). The former is mostly for readable error messages, the latter provides better collision resistance.Data size larger than , but usually smaller than .JBoth the hash and the shown type must match to satisfy the typechecker.aUseful type errors ("expected X, received Y"). All types are shown unqualified though, making Foo.X and Bar.Xz look identical in error messages. Remember this when you get a seemingly silly error "expected Foo, but given Foo".Like , but uses a 64-bit hash value.+Requires nine bytes more compared to using /.;Hash collisions are even less likely to occur than with .Computational cost similar to .FCompare types by their hash values (using the MurmurHash2 algorithm).+Requires five bytes more compared to using /5 directly for the type information (one to tag as , four for the hash value)jSubject to false positive due to hash collisions, although in practice this should almost never happen.VType errors cannot tell the provided type ("Expected X, received type with hash H")Computational cost similar to . Include no type information.)Requires one byte more compared to using /L directly (to tag the data as untyped, required for the decoding step).†Encoding and decoding require negligible amount of additional computational cost compared to direct (intrinsically untyped) /. OA value suitable to be typechecked using the contained extra type information. XUsing this data constructor directly is unsafe, as it allows construction of ill-typed   data. Use the + smart constructor unless you really need  . A hash value of a D. Currently a 64-bit value created using the MurmurHash2 algorithm.A hash value of a D. Currently a 32-bit value created using the MurmurHash2 algorithm.rType information stored alongside a value to be serialized, so that the recipient can do consistency checks. See . for more detailed information on the fields.Extract which  was used to create a certain .If the type is x, then the contained information is assumed well-formed. In the public API, this is safe to do, since only well-typed  * values can be created in the first place.¯Sometimes it can be beneficial to serialize the type information in advance, so that the maybe costly serialization step does not have to be repeated on every invocation of 0G. Preserialization comes at a price though, as the directly contained 1n requires its length to be included in the final serialization, yielding a 8-byte overhead for the required A, and one for the tag of what was serialized ("shown or full?").3This function calculates the serialized version of s in cases where the required 9 bytes are negligible (determined by an arbitrary threshold, currently 10*9 bytes). Used to make C more efficient; the source there also makes a good usage example.2vPreserializes type information if its encoded byte length is larger than an arbitrary threshold. Less efficient than Z since it always preserializes and always calculates the encoded version no matter what. Construct a  $ value using the chosen type format.Example: value =   ("hello", 1 :: 3 , 2.34 :: 4 ) encded = 0 value LThe decode site can now verify whether decoding happens with the right type. Create the  to be stored inside a   value from a ,.Extract the value of a  0, i.e. strip off the explicit type information.%This function is safe to use for all  € values created by the public API, since all construction sites ensure the actual type matches the contained type description.  ( format x) == x  Typecheck a  U. Returns the (well-typed) input, or an error message if the types don't work out.Hash a , to a 32-bit digest.Hash a , to a 64-bit digest.Strip a ,! off the fingerprint. Inverse of  . Add a fingerprint to a  . Inverse of .!Strip a +! off the fingerprint. Inverse of "."Add a fingerprint to a  . Inverse of !.5gEnsures data is decoded as the appropriate type with high or total confidence (depending on with what  the   was constructed).6"typed <format> <value>"1 2 !"789:;<=>56?@A#  !"#    !"!    2 !"789:;<=>56?@A Safe-InferredM# Modify the value contained in a  I, keeping the same sort of type representation. In other words, calling ## on something that is typed using Hashed will yield a Hashed value again.Note: this destroys precache*d information, so that values have to be precache&d again if desired. As a consequence, # B can be used to un-precache values.$ Change the value contained in a  Ñ, leaving the type representation unchanged. This can be useful to avoid recomputation of the included type information, and can improve performance significantly if many individual messages are serialized. Can be seen as a more efficient # in case f$ is an endomorphism (i.e. has type a -> a).%.Change the way a type is represented inside a   value. % format x =  format ( x) & Encode a C value to 1Ï that includes type information. This function is useful to create specialized typed encoding functions, because the type information is cached and does not need to be recalculated on every serialization.Observationally, & format value is equivalent to 0 ( format value) . However, &¿ does the type information related calculations in advance and shares the results between future invocations of it, making it much more efficient to serialize many values of the same type.(PDecode a typed value, throwing an error at runtime on failure. Typed cousin of D.  encoded = &  ("hello", 1 :: 3 , 2.34 :: 4) -- <value> ( encoded :: (-, 3, 4") -- (Descriptive) runtime error ( encoded :: (E, 3, 4) )Safely decode data, yielding F an error -H or the value, along with meta-information of the consumed binary data.Typed cousin of G.Like *, but with additional data.*Safely decode data, yielding F an error - or the value. Equivalent to )$ stripped of the non-essential data.  encoded = &  ("hello", 1 :: 3 , 2.34 :: 4) -- Right <value>: * encoded :: F - (-, 3, 4Q) -- Left "Type error: expected (Char, Int, Double), got (String, Int, Double)" * encoded :: F - (E, 3, 4) #$%&'()* #$%&'()*  #$%&'*)(#$%&'()* Safe-InferredH      !"#$%&'()*+,-,-,./,01234256789:;<=;<>?@ABCDEFGHIJK,.L,-M25N;<O,PQ25RSbinary-typed-0.2.1.0Data.Binary.Typed.InternalData.Binary.TypedData.IntInt64 encodeTypedData.Binary.Typed.TutorialTyConTypeRep TypeFormatFullShownHashed64Hashed32UntypedTypedHash64Hash32TypeInformationCached'Full'Shown' Hashed64' Hashed32'Untyped' getFormat preserializetypedmakeTypeInformationerase typecheck hashType32 hashType64 stripTypeRepunStripTypeRep stripTyCon unStripTyConmapTypedreValuereTypeencodeTypedLikeunsafeDecodeTypeddecodeTypedOrFail decodeTypedbaseData.Typeable.InternalGHC.BaseStringGHC.Showshowbinary-0.7.1.0Data.Binary.ClassBinary Data.Binaryencodebytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteString preserialize'ghc-prim GHC.TypesIntDouble $fBinaryTyped $fShowTyped$fHashable64TyCon$fHashable32TyCon $fShowTyCon $fBinaryTyCon$fHashable64TypeRep$fHashable32TypeRep $fShowTypeRep$fBinaryTypeRep$fBinaryHash64$fBinaryHash32$fBinaryTypeInformationidTypeabledecodeChar Data.EitherEither decodeOrFail