svfactor-0.1: Syntax-preserving CSV manipulation

Copyright(C) CSIRO 2017-2018
LicenseBSD3
MaintainerGeorge Wilson <george.wilson@data61.csiro.au>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Svfactor.Text.Newline

Description

A sum type for line endings

Synopsis

Documentation

data Newline Source #

Newline is a sum type for line endings

Constructors

CR
"\r"
LF
"\n"
CRLF
"\rn"

class AsNewline r where Source #

AsNewline is a classy prism for Newline

Minimal complete definition

_Newline

newlineToString :: IsString s => Newline -> s Source #

Convert a Newline to a String. Since this uses IsString, it works for other data types, like Text or ByteString.

parseNewline :: Text -> Maybe Newline Source #

Try to parse text into a Newline