a]%      !"#$ 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  and C. As a rule of thumb, transmitted data is roughly the same as F, but all names are fully qualified (package, module, type name).yCorrect 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.cUseful type errors ("expected X, received Y"). All types are shown unqualified though, making Foo.X and Bar.X' look identical in error messages.Compare '1 representation of types, obtained by calling ( on the ), and also include a hash value (like a). The former is mostly for readable error messages, the latter provides collision resistance.Data size larger than , but usually smaller than .LBoth the hash and the shown type must match to satisfy the typechecker.cUseful type errors ("expected X, received Y"). All types are shown unqualified though, making Foo.X and Bar.X' look identical in error messages.HCompare types by their hash values (using the MurmurHash2 algorithm).:Requires only 8 additional bytes for the type information.lSubject to false positive due to hash collisions, although in practice this should almost never happen.XType errors cannot tell the provided type ("Expected X, received type with hash H")Include no type information."Requires one byte more than using )S directly (namely to tag the data as untyped, required for the decoding step). QA 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 F. Currently a 64-bit value created using the MurmurHash2 algorithm. tType information stored alongside a value to be serialized, so that the recipient can do consistency checks. See 0 for more detailed information on the fields.Extract which  was used to create a certain  .!Calculate the serialization of a   and store it in a  B value so it does not have to be recalculated on every call to *.9This is typically applied to a dummy value created using  and the desired ,; the actual data is then inserted using , which is how  works. Construct a  $ value using the chosen type format.Example: value =   ("hello", 1 :: + , 2.34 :: , ) encded = * value LThe decode site can now verify whether decoding happens with the right type.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 &.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 .-iEnsures data is decoded as the appropriate type with high or total confidence (depending on with what  the   was constructed).."typed <format> <value>"' /01234-.56      /01234-.56 Safe-Inferred Modify the value contained in a  K, keeping the same sort of type representation. In other words, calling % on something that is typed using  will yield a  value again.Note: this destroys ,d information, so that values have to be &d again if desired. As a consequence,  7 can be used to un- 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 8 value to 9P that includes type information. If at all possible, prefer the more efficient ! though.   format value = * ( format value) ! Version of   that avoids recomputing the type representation of the input by using the one already contained in the first parameter. This is usually much more efficient than using *2, having a computational cost similar to using ) directly. !) ty x -- is observationally identical to * ( (: x) ty) EThis function is intended to generate new encoding functions like so:  encodeInt :: + ->  encodeInt = ! (  0) "RDecode a typed value, throwing an error at runtime on failure. Typed cousin of ;.  encoded =    ("hello", 1 :: + , 2.34 :: ,) -- <value> " encoded :: (', +, ,") -- (Descriptive) runtime error " encoded :: (<, +, ,) #Safely decode data, yielding = an error 'J or the value, along with meta-information of the consumed binary data.Typed cousin of >.Like $, but with additional data.$Safely decode data, yielding = an error ' or the value. Equivalent to #$ stripped of the non-essential data.  encoded =    ("hello", 1 :: + , 2.34 :: ,) -- Right <value>: $ encoded :: = ' (', +, ,Q) -- Left "Type error: expected (Char, Int, Double), got (String, Int, Double)" $ encoded :: = ' (<, +, ,)  !"#$  !"#$  !$#" !"#$ Safe-Inferred?       !"#$%&'('( ')*'+,-./-012342356789:;<=>?')@'(ABC')D-0E23F'GH-0IJbinary-typed-0.1.0.1Data.Binary.Typed.InternalData.Binary.TypedreValue encodeTypedData.ByteString.Lazy ByteStringData.Binary.Typed.TutorialTyConTypeRep TypeFormatFullShownHashedUntypedTypedHashTypeInformationCached'Full'Shown'Hashed'Untyped' getFormatprecachetypederase typecheckhashType stripTypeRepunStripTypeRep stripTyCon unStripTyConmapTypedreTypeencodeTypedLikeunsafeDecodeTypeddecodeTypedOrFail decodeTypedbaseData.Typeable.InternalGHC.BaseStringGHC.Showshowbinary-0.7.1.0Data.Binary.ClassBinary Data.Binaryencodeghc-prim GHC.TypesIntDouble $fBinaryTyped $fShowTyped$fHashable64TyCon $fShowTyCon $fBinaryTyCon$fHashable64TypeRep $fShowTypeRep$fBinaryTypeRep $fBinaryHash$fBinaryTypeInformationidTypeablebytestring-0.10.4.0Data.ByteString.Lazy.InternalconstdecodeChar Data.EitherEither decodeOrFail