parseKeyValueCsv 
  :: forall (m :: * -> *) (f :: k -> *) (g :: j -> *) (hs :: [k]) (rs :: [j]) (r :: *)
   . ( Monad m
     , Record hs
     )
  => Options m f g hs rs
  -> Producer Text m r
  -> m 
     ( Rec (WithKeyValueError :. f) hs
     , Producer (Rec (WithCsvError :. g) rs) m r
    )
-- ^Read a CSV file preceded by key-value pairs.
parseKeyValueCsv options producer = useDelimiter (options^.delimiter) $ do
 (hdr, remaining)
   <- parseKeyValues (options^.kvOptions) 
    . breakLines (options^.predicate) 
    $ lines producer
 pure (hdr, parseCsv (options^.csvOptions) remaining)
parseKeyValueCsv 
  :: forall (m :: * -> *) (f :: k -> *) (g :: j -> *) (hs :: [k]) (rs :: [j]) (r :: *)
   . ( Monad m
     , Record hs
     )
  => Options m f g hs rs
  -> Producer Text m r
  -> m 
     ( Rec (WithKeyValueError :. f) hs
     , Producer (Rec (WithCsvError :. g) rs) m r
    )
parseKeyValueCsv options producer = useDelimiter (options^.delimiter) $ do
 (hdr, remaining)
   <- parseKeyValues (options^.kvOptions) 
    . breakLines (options^.predicate) 
    $ lines producer
 pure (hdr, parseCsv (options^.csvOptions) remaining)
parseKeyValueCsv options producer = useDelimiter (options^.delimiter) $ do
 (hdr, remaining)
   <- parseKeyValues (options^.kvOptions) 
    . breakLines (options^.predicate) 
    $ lines producer
 pure (hdr, parseCsv (options^.csvOptions) remaining)