svfactor-0.1: Syntax-preserving CSV manipulation

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

Data.Svfactor.Print

Description

Printing is the process of turning an Sv into a textual representation, such as a ByteString.

If you want to turn your data type into a textual representation, you should look instead at Data.Svfactor.Encode

Synopsis

Documentation

printSv :: Sv ByteString -> ByteString Source #

Print an Sv to a ByteString value.

printSvLazy :: Sv ByteString -> ByteString Source #

Print an Sv to a lazy ByteString value.

printSv' :: PrintOptions s -> Sv s -> ByteString Source #

Converts the given Sv into a strict ByteString

printSvLazy' :: PrintOptions s -> Sv s -> ByteString Source #

Converts the given Sv into a lazy ByteString

printSvText :: Sv Text -> ByteString Source #

Print an Sv containing Text to a ByteString

printSvTextLazy :: Sv Text -> ByteString Source #

Print an Sv containing Text to a ByteString

writeSvToFile :: FilePath -> Sv ByteString -> IO () Source #

Writes an sv to a file. This goes directly from a Builder, so it is more efficient than calling printSv or printSvLazy and writing the result to a file.

writeSvToHandle :: Handle -> Sv ByteString -> IO () Source #

Writes an sv to a file handle. This goes directly from a Builder, so it is more efficient than calling printSv or printSvLazy and writing the result to the handle.

writeSvToFile' :: PrintOptions s -> FilePath -> Sv s -> IO () Source #

Writes an sv to a file. This goes directly from a Builder, so it is more efficient than calling printSv or printSvLazy and writing the result to a file.

This version is polymorphic, but as a penalty you have to tell me how to get a Bytestring Builder.

writeSvToHandle' :: PrintOptions s -> Handle -> Sv s -> IO () Source #

Writes an sv to a file handle. This goes directly from a Builder, so it is more efficient than calling printSv or printSvLazy and writing the result to the handle.

This version is polymorphic, but as a penalty you have to tell me how to get a Bytestring Builder.