-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Integration to use sv with cassava's parser
--   
--   This package provides functions allowing you to use cassava's parser
--   together with sv-core's decoding.
@package sv-cassava
@version 0.3


-- | This module provides integration between sv and cassava. It lets you
--   plug cassava's (very fast!) parser into sv's decoding layer.
--   
--   Our benchmarking indicates that parsing is very expensive, while
--   decoding is comparatively less performance-sensitive. So if
--   performance matters to you, and cassava's parser is sufficient for
--   your needs, you might as well use it!
--   
--   sv's own parser is much slower than cassava's right now, but aims to
--   have better error messages and keep more information for you to work
--   with, such as spacing, quoting, and newline information.
module Data.Sv.Cassava

-- | Parse a <a>Csv</a> from a <a>ByteString</a> using cassava's parser,
--   then decode it using the given <tt>Decode</tt>.
--   
--   This has the benefit of letting you use cassava's parser, which is
--   very fast, with sv's decoding.
parseDecodeFromCassava :: Decode' ByteString a -> Headedness -> DecodeOptions -> ByteString -> DecodeValidation ByteString [a]

-- | Parse a <a>Csv</a> from a <a>ByteString</a> using cassava's parser
--   
--   This returns its result in a <a>DecodeValidation</a>, so that it's
--   compatible with the rest of sv.
parseCassava :: DecodeOptions -> ByteString -> DecodeValidation ByteString Csv

-- | Use an sv <tt>Decode</tt> to decode from cassava's <a>Csv</a> type.
decodeFromCassava :: Decode' ByteString a -> Csv -> DecodeValidation ByteString [a]
