svfactor-0.1: Syntax-preserving CSV manipulation

Copyright (C) CSIRO 2017-2018 BSD3 George Wilson experimental non-portable None Haskell2010

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

Print an Sv to a ByteString value.

Print an Sv to a lazy ByteString value.

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

Converts the given Sv into a strict ByteString

Converts the given Sv into a lazy ByteString

Print an Sv containing Text to a ByteString

Print an Sv containing Text to a ByteString

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.

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.