HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulecommonmark-0.3.1Haskell2010

Commonmark.Tokens

Synopsis
  • Packagecommonmark-0.3.1
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePos.hs
datadata SourcePos

The abstract data type SourcePos represents source positions. It contains the name of the source (i.e. file name), a line number and a column number. SourcePos is an instance of the Show, Eq and Ord class.

Instances4Eq, Data, Ord, Show
valuetokenize :: String -> Text -> [Tok]

Convert a Text into a list of Tok. The first parameter species the source name. The text is normalized to NFC, and U+0000 is replaced with U+FFFD, as required by the spec (section 2.3, Insecure characters).

valueuntokenize :: [Tok] -> Text

Reverses tokenize. untokenize . tokenize should be the identity on text that is NFC-normalized and does not contain U+0000.