ascii-superset-1.2.7.0: Representing ASCII with refined supersets
Safe HaskellSafe-Inferred
LanguageHaskell2010

ASCII.Lift

Description

(lift CapitalLetterA :: Word8) == 65

(lift [CapitalLetterH, SmallLetterI, ExclamationMark] :: Text) == "Hi!"
Synopsis
  • class Lift subset superset where
    • lift :: subset -> superset

Documentation

class Lift subset superset where Source #

Embedding of one character set within another

The subset and superset types may be characters or strings in ASCII, some subset of ASCII, or some superset of ASCII.

Methods

lift :: subset -> superset Source #

Converts from a smaller to a larger type

Due to the highly polymorphic nature of the lift function, often it must used with an explicit type signature or type application to avoid any type ambiguity.

Instances

Instances details
CharSuperset superset => Lift Char superset Source #

An ASCII Char may be lifted into any larger character set (a CharSuperset); for example, lift can convert an ASCII character into a value of the standard Char type in Prelude.

Instance details

Defined in ASCII.Lift

Methods

lift :: Char -> superset Source #

Lift a a Source # 
Instance details

Defined in ASCII.Lift

Methods

lift :: a -> a Source #

Lift (ASCII superset) superset Source #

A value from an ASCII superset that has been refined by the ASCII type constructor may be lifted back into the superset by unwrapping it from the ASCII type.

Instance details

Defined in ASCII.Lift

Methods

lift :: ASCII superset -> superset Source #

StringSuperset superset => Lift [Char] superset Source #

An ASCII Char list may be lifted into a string of any larger character set (a StringSuperset); for example, lift can convert a list of ASCII characters into a value of the standard String type in Prelude.

Instance details

Defined in ASCII.Lift

Methods

lift :: [Char] -> superset Source #

Lift (ASCII'case letterCase superset) superset Source # 
Instance details

Defined in ASCII.Lift

Methods

lift :: ASCII'case letterCase superset -> superset Source #

Lift (ASCII'case letterCase superset) (ASCII superset) Source # 
Instance details

Defined in ASCII.Lift

Methods

lift :: ASCII'case letterCase superset -> ASCII superset Source #