hunt-searchengine-0.3.0.1: A search and indexing engine.

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Bijection

Description

Bijection instances represent a bijection between two types and allow conversion to and from.

Synopsis

Documentation

class Bijection a b where Source

Bijection between two types a and b. to and from represent the bijective function.

For a proper bijection between x and y, two instances need to be defined (Bijection x y and Bijection y x).

Methods

to :: a -> b Source

from :: b -> a Source

Instances

Bijection String Text

String to Text.

Bijection Text String

Text to String.

Bijection MBB Text

Newtype to allow date normalization Bijection instance.