typed-encoding-encoding-0.1.0.0: Bridge between encoding and typed-encoding packages

Safe HaskellNone
LanguageHaskell2010

Data.TypedEncoding.Pkg.Encoding

Contents

Description

This package is a thin layer over the encoding package to create types compatible with type-encoding.

Naming conventions

"enc-pkg/encoding:[encoding]"

where "[encoding]" is String name used by the DynEncoding in the encoding package.

Example: "enc-pkg/encoding:cyrillic"

Warnings / AS-IS type wrapping

The encoding package can exhibit behavior that may not map well to type level guarantees that typed-encoding tries to enforce, examples of this are documented in

Data.TypedEncoding.Pkg.Encoding.Conv

In particular, it seems not possible to implement Validate instance with a decent performance.

For this reason module defining it is annotated with WARNING pragma and is kept separate:

Data.TypedEncoding.Pkg.Encoding.Warn.Instances (typed-encoding Validate instance for String encodings)

Synopsis

Type safe versions of encode and decode functions from encoding package

typed-encoding class instances for Encode, Decode, ToEncString, and FromEncString