Skip to content
Cinch
← Text.Utf8 API referenceSAMPLE LISTING
cinch-text / 0.3.0Text/Utf8.cinch

Declaration source.

This sample listing contains the declarations shown in the API reference. Package implementations will appear here when real package data is connected.

module Text.Utf8 where
3-- An invalid byte sequence and the offset at which decoding failed.
4data Utf8Error
5
6-- Decode UTF-8 bytes. Invalid sequences produce a structured error.
7decode :: Bytes -> Result Utf8Error String
8
9-- Encode a string as UTF-8 bytes.
10encode :: String -> Bytes
12-- Split text at line boundaries.
13lines :: String -> List String