Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Common types and some type families used in typed-encoding definitions.
This module is re-exported in Data.TypedEncoding and it is best not to import it directly.
Synopsis
- type EncAnn = String
- type Restriction s = (KnownSymbol s, IsR s ~ True)
- type EncodingAnn s = (KnownSymbol s, IsEnc 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 ...
- type family RemoveRs (s :: [Symbol]) :: [Symbol] where ...
- type family IsEnc (s :: Symbol) :: Bool where ...
Documentation
>>>
:set -XScopedTypeVariables -XTypeFamilies -XKindSignatures -XDataKinds
type Restriction s = (KnownSymbol s, IsR s ~ True) Source #
Constraint for "r-" annotations.
Since: 0.3.0.0
type EncodingAnn s = (KnownSymbol s, IsEnc s ~ True) Source #
Constraint for "r-" annotations.
Since: 0.4.1.0
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"
>>>
:kind! AlgNm "enc-B64"
... = "enc-B64"
>>>
:kind! AlgNm "r-ban:999-99-9999"
... = "r-ban"
Since: 0.3.0.0
type family IsR (s :: Symbol) :: Bool where ... Source #
>>>
:kind! IsR "r-UPPER"
... ... 'True
>>>
:kind! IsR "do-UPPER"
... = (TypeError ...
Since: 0.2.1.0
type family IsROrEmpty (s :: Symbol) :: Bool where ... Source #
Since: 0.2.1.0
IsROrEmpty "" = True | |
IsROrEmpty x = IsR x |