typed-encoding-0.2.2.0: Type safe string transformations

Safe HaskellSafe
LanguageHaskell2010

Data.TypedEncoding.Internal.Class.Util

Contents

Synopsis

Documentation

>>> :set -XScopedTypeVariables -XTypeApplications -XAllowAmbiguousTypes -XDataKinds

Symbol List

class SymbolList (xs :: [Symbol]) where Source #

Instances
SymbolList ([] :: [Symbol]) Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

(SymbolList xs, KnownSymbol x) => SymbolList (x ': xs) Source #
>>> symbolVals @ '["FIRST", "SECOND"]
["FIRST","SECOND"]
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

symbolVals_ :: forall xs. SymbolList xs => Proxy xs -> [String] Source #

Display

class Displ x where Source #

Human friendly version of Show

Methods

displ :: x -> String Source #

Instances
Displ ByteString Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Displ ByteString Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Displ Text Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

displ :: Text -> String Source #

Displ Text Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

displ :: Text -> String Source #

Displ EncAnn Source #

TODO 0.3 TO BE REMOVED

Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

displ :: EncAnn -> String Source #

Displ [EncAnn] Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

displ :: [EncAnn] -> String Source #

Displ a => Displ (SimplifiedEmailF a) Source #

Provides easy to read encoding information

Instance details

Defined in Examples.TypedEncoding.ToEncString

Displ a => Displ (IpV4F a) Source #

Provides easy to read encoding information

Instance details

Defined in Examples.TypedEncoding.ToEncString

Methods

displ :: IpV4F a -> String Source #

SymbolList xs => Displ (Proxy xs) Source #
>>> displ (Proxy :: Proxy ["FIRST", "SECOND"])
"[FIRST,SECOND]"
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

displ :: Proxy xs -> String Source #

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

Defined in Data.TypedEncoding.Internal.Types.CheckedEnc

Methods

displ :: CheckedEnc c str -> String Source #

(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 #

(Show c, Displ str) => Displ (SomeEnc c str) Source #
>>> let enctest = unsafeSetPayload () "hello" :: Enc '["TEST"] () T.Text
>>> displ $ MkSomeEnc enctest
"Some (MkEnc '[TEST] () (Text hello))"
Instance details

Defined in Data.TypedEncoding.Internal.Types.SomeEnc

Methods

displ :: SomeEnc c str -> String Source #

(SymbolList xs, Show c, Displ str) => Displ (Enc xs c str) Source #
>>> let disptest = unsafeSetPayload () "hello" :: Enc '["TEST"] () T.Text
>>> displ disptest
"MkEnc '[TEST] () (Text hello)"
Instance details

Defined in Data.TypedEncoding.Internal.Types.Enc

Methods

displ :: Enc xs c str -> String Source #

Other

type family Append (xs :: [k]) (ys :: [k]) :: [k] where ... Source #

TODO should this be imported from somewhere?

Equations

Append '[] xs = xs 
Append (y ': ys) xs = y ': Append ys xs 

class HasA a c where Source #

Polymorphic data payloads used to encode/decode

Methods

has :: c -> a Source #

Instances
HasA () c Source # 
Instance details

Defined in Data.TypedEncoding.Internal.Class.Util

Methods

has :: c -> () Source #

HasA SizeLimit Config Source # 
Instance details

Defined in Examples.TypedEncoding.Overview

Methods

has :: Config -> SizeLimit Source #