Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type EncAnn = String
- type Restriction s = (KnownSymbol s, IsR s ~ True)
- type Algorithm nm alg = AlgNm nm ~ alg
- type family AlgNm (encnm :: Symbol) :: Symbol where ...
- type family AlgNmMap (nms :: [Symbol]) :: [Symbol] where ...
- type family IsR (s :: Symbol) :: Bool where ...
- type family IsROrEmpty (s :: Symbol) :: Bool where ...
Documentation
>>>
:set -XScopedTypeVariables -XTypeFamilies -XKindSignatures -XDataKinds
type Restriction s = (KnownSymbol s, IsR s ~ True) Source #
type family AlgNm (encnm :: Symbol) :: Symbol where ... Source #
Converts encoding name to algorithm name, this assumes the ":" delimiter expected by this library.
This allows working with open encoding definitions such as "r-ban" or "r-bool"
>>>
:kind! AlgNm "enc-B64"
... = "enc-B64"
>>>
:kind! AlgNm "r-ban:999-99-9999"
... = "r-ban"
type family IsR (s :: Symbol) :: Bool where ... Source #
>>>
:kind! IsR "r-UPPER"
... ... 'True
>>>
:kind! IsR "do-UPPER"
... = (TypeError ...
type family IsROrEmpty (s :: Symbol) :: Bool where ... Source #
IsROrEmpty "" = True | |
IsROrEmpty x = IsR x |