Permalink
Browse files

Remove toNamedRecord copy

  • Loading branch information...
1 parent c1af44f commit 50f2e5383cb6fae83a7d66a2e9e62e3ba23326c9 @tibbe committed Feb 25, 2013
Showing with 1 addition and 6 deletions.
  1. +1 −6 Data/Csv/Incremental.hs
View
@@ -39,13 +39,12 @@ import Control.Applicative ((<*), (<|>))
import qualified Data.Attoparsec as A
import Data.Attoparsec.Char8 (endOfInput, endOfLine)
import qualified Data.ByteString as B
-import qualified Data.HashMap.Strict as HM
import qualified Data.Vector as V
import Data.Csv.Conversion hiding (Parser, record, toNamedRecord)
import qualified Data.Csv.Conversion as Conversion
import Data.Csv.Parser
-import Data.Csv.Types hiding (toNamedRecord)
+import Data.Csv.Types
-- $feed-header
--
@@ -259,10 +258,6 @@ decodeByNameWith !opts =
go (DoneH hdr rest) =
DoneH hdr (decodeWithP (parseNamedRecord . toNamedRecord hdr) opts rest)
--- Copied from Data.Csv.Parser
-toNamedRecord :: Header -> Record -> NamedRecord
-toNamedRecord hdr v = HM.fromList . V.toList $ V.zip hdr v
-
------------------------------------------------------------------------
-- | Like 'decode', but lets you customize how the CSV data is parsed.

0 comments on commit 50f2e53

Please sign in to comment.