typed-encoding-0.2.1.0: Type safe string transformations

Safe HaskellSafe
LanguageHaskell2010

Data.TypedEncoding.Internal.Types.UncheckedEnc

Contents

Description

Internal definition of types

Synopsis

Documentation

>>> :set -XOverloadedStrings -XMultiParamTypeClasses -XDataKinds -XAllowAmbiguousTypes
>>> import qualified Data.Text as T

UncheckedEnc for recreate, similar to CheckedEnc only not verified

data UncheckedEnc c str Source #

Represents some encoded string where encoding was not validated.

Similar to CheckedEnc but unlike CheckedEnc it can contain payloads that have invalid encoding.

Constructors

MkUncheckedEnc [EncAnn] c str 
Instances
(Eq c, Eq str) => Eq (UncheckedEnc c str) Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Types.UncheckedEnc

Methods

(==) :: UncheckedEnc c str -> UncheckedEnc c str -> Bool #

(/=) :: UncheckedEnc c str -> UncheckedEnc c str -> Bool #

(Show c, Show str) => Show (UncheckedEnc c str) Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Types.UncheckedEnc

Methods

showsPrec :: Int -> UncheckedEnc c str -> ShowS #

show :: UncheckedEnc c str -> String #

showList :: [UncheckedEnc c str] -> ShowS #

(Show c, Displ str) => Displ (UncheckedEnc c str) Source #
>>> displ $ MkUncheckedEnc ["TEST"] () ("hello" :: T.Text)
"MkUncheckedEnc [TEST] () (Text hello)"
Instance details

Defined in Data.TypedEncoding.Internal.Types.UncheckedEnc

Methods

displ :: UncheckedEnc c str -> String Source #

toUncheckedEnc :: [EncAnn] -> c -> str -> UncheckedEnc c str Source #

verifyAnn :: forall xs c str. SymbolList xs => UncheckedEnc c str -> Either String (UncheckedEnc c str) Source #