haskus-binary-1.3: Haskus binary format manipulation

Safe HaskellNone
LanguageHaskell2010

Haskus.Format.Text.ASCII

Description

ASCII character map and encoding

Synopsis

Documentation

data ASCII Source #

ASCII character map and encoding

Constructors

ASCII 
Instances
ShowText ASCII (Buffer mut pin gc heap) Source #

Instance for ASCII text

>>> :set -XOverloadedLists
>>> let b = [72,69,76,76,79] :: BufferI
>>> showText (TextBuffer @ASCII b)
"HELLO"
Instance details

Defined in Haskus.Format.Text.ASCII

Methods

showTextIO :: MonadIO m => TextBuffer ASCII (Buffer mut pin gc heap) -> m String Source #

showText :: TextBuffer ASCII (Buffer mut pin gc heap) -> String Source #

(IsList b, Item b ~ Word8) => IsString (TextBuffer ASCII b) Source #

Support ASCII text with OverloadedStrings

>>> :set -XOverloadedStrings
>>> let t = "HELLO" :: TextI ASCII
>>> showText t
"HELLO"
>>> let badt = "José" :: TextI ASCII
>>> showText badt
"*** Exception: Invalid ASCII character: é
Instance details

Defined in Haskus.Format.Text.ASCII