errata-0.3.0.0: Source code error pretty printing
Copyright(c) 2020 comp
LicenseMIT
Maintaineronecomputer00@gmail.com
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Errata.Source

Description

A class for source text types. You should not need to use this, except to add new source types.

Synopsis

Documentation

class Monoid s => Source s where Source #

A class for manipulating and converting source text.

For ByteString source types, you should convert it to one of the built-in instances with your encoding of choice.

Every Source must be a Monoid to allow for a mempty which will be used as a source line when a pointer references an out-of-bounds line.

Methods

sourceToLines :: s -> [s] Source #

Splits the source into lines.

sourceToText :: s -> Text Source #

Converts the source text to Text (strict). The given source text is a single line of the source.

Instances

Instances details
Source String Source # 
Instance details

Defined in Errata.Source

Source Text Source # 
Instance details

Defined in Errata.Source

Source Text Source # 
Instance details

Defined in Errata.Source