mmzk-typeid-0.6.0.1: A TypeID implementation for Haskell
LicenseMIT
Maintainermmzk1526@outlook.com
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.KindID.V1.Unsafe

Description

Unsafe KindIDV1 functions.

Synopsis

Unsafe KindIDV1 decoding (KindIDV1-specific)

unsafeParseString :: (ToPrefix prefix, ValidPrefix (PrefixSymbol prefix)) => String -> KindIDV1 prefix Source #

Parse a KindIDV1 from its String representation, but does not behave correctly when parsing fails.

More specifically, if the prefix does not match, it will not complain and produce the wrong KindIDV1. If there are other parse errors, it will crash.

unsafeParseText :: (ToPrefix prefix, ValidPrefix (PrefixSymbol prefix)) => Text -> KindIDV1 prefix Source #

Parse a KindIDV1 from its string representation as a strict Text, but does not behave correctly when parsing fails.

More specifically, if the prefix does not match, it will not complain and produce the wrong KindIDV1. If there are other parse errors, it will crash.

unsafeParseByteString :: (ToPrefix prefix, ValidPrefix (PrefixSymbol prefix)) => ByteString -> KindIDV1 prefix Source #

Parse a KindIDV1 from its string representation as a lazy ByteString, but does not behave correctly when parsing fails.

More specifically, if the prefix does not match, it will not complain and produce the wrong KindIDV1. If there are other parse errors, it will crash.

Unsafe KindIDV1 decoding (class methods)

unsafeString2ID :: IDConv a => String -> a Source #

Parse the identifier from its String representation, but crashes when the parsing fails.

unsafeText2ID :: IDConv a => Text -> a Source #

Parse the identifier from its string representation as a strict Text, but crashes when the parsing fails.

unsafeByteString2ID :: IDConv a => ByteString -> a Source #

Parse the identifier from its string representation as a lazy ByteString, but crashes when the parsing fails.

Unsafe conversion

unsafeFromTypeID :: (ToPrefix prefix, ValidPrefix (PrefixSymbol prefix)) => TypeIDV1 -> KindIDV1 prefix Source #

Convert a TypeIDV1 to a KindIDV1. If the actual prefix does not match with the expected one as defined by the type, it does not complain and produces a wrong KindIDV1.