Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename D.Ceason to D.Csv

  • Loading branch information...
commit d169845a78c0e9d3a8c0d1aceccc2ef40417eeec 1 parent ac088b8
@tibbe authored
View
8 Data/Ceason.hs → Data/Csv.hs
@@ -9,7 +9,7 @@
--
-- * Escaped fields may contain any characters (but double-quotes
-- need to be escaped).
-module Data.Ceason
+module Data.Csv
(
-- * Usage example
-- $example
@@ -65,9 +65,9 @@ module Data.Ceason
, ToField(..)
) where
-import Data.Ceason.Conversion
-import Data.Ceason.Encoding
-import Data.Ceason.Types
+import Data.Csv.Conversion
+import Data.Csv.Encoding
+import Data.Csv.Types
-- $example
--
View
6 Data/Ceason/Conversion.hs → Data/Csv/Conversion.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE FlexibleInstances, OverloadedStrings, Rank2Types #-}
-module Data.Ceason.Conversion
+module Data.Csv.Conversion
(
-- * Type conversion
Only(..)
@@ -44,8 +44,8 @@ import Data.Word
import GHC.Float (double2Float)
import Prelude hiding (takeWhile)
-import Data.Ceason.Conversion.Internal
-import Data.Ceason.Types
+import Data.Csv.Conversion.Internal
+import Data.Csv.Types
------------------------------------------------------------------------
-- Type conversion
View
2  Data/Ceason/Conversion/Internal.hs → Data/Csv/Conversion/Internal.hs
@@ -1,4 +1,4 @@
-module Data.Ceason.Conversion.Internal
+module Data.Csv.Conversion.Internal
( decimal
, realFloat
) where
View
12 Data/Ceason/Encoding.hs → Data/Csv/Encoding.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
--- Module: Data.Ceason.Encode
+-- Module: Data.Csv.Encoding
-- Copyright: (c) 2011 MailRank, Inc.
-- (c) 2012 Johan Tibell
-- License: BSD3
@@ -9,7 +9,7 @@
-- Portability: portable
--
-- Encoding and decoding of data types into CSV.
-module Data.Ceason.Encoding
+module Data.Csv.Encoding
(
-- * Encoding and decoding
decode
@@ -44,9 +44,9 @@ import qualified Data.Vector as V
import Data.Word (Word8)
import Prelude hiding (unlines)
-import Data.Ceason.Conversion
-import Data.Ceason.Parser
-import Data.Ceason.Types
+import Data.Csv.Conversion
+import Data.Csv.Parser
+import Data.Csv.Types
-- TODO: 'encode' isn't as efficient as it could be.
@@ -156,7 +156,7 @@ namedRecordToRecord hdr nr = V.map find hdr
Just v -> v
moduleError :: String -> String -> a
-moduleError func msg = error $ "Data.Ceason.Encoding." ++ func ++ ": " ++ msg
+moduleError func msg = error $ "Data.Csv.Encoding." ++ func ++ ": " ++ msg
{-# NOINLINE moduleError #-}
unlines :: [Builder] -> Builder
View
4 Data/Ceason/Parser.hs → Data/Csv/Parser.hs
@@ -13,7 +13,7 @@
--
-- The functions in this module can be used to implement e.g. a
-- resumable parser that is fed input incrementally.
-module Data.Ceason.Parser
+module Data.Csv.Parser
( DecodeOptions(..)
, defaultDecodeOptions
, csv
@@ -38,7 +38,7 @@ import Data.Monoid
import qualified Data.Vector as V
import Data.Word
-import Data.Ceason.Types
+import Data.Csv.Types
-- | Options that controls how data is decoded. These options can be
-- used to e.g. decode tab-separated data instead of comma-separated
View
2  Data/Ceason/Types.hs → Data/Csv/Types.hs
@@ -1,4 +1,4 @@
-module Data.Ceason.Types
+module Data.Csv.Types
(
-- * Core CSV types
Csv
View
2  benchmarks/Benchmarks.hs
@@ -11,7 +11,7 @@ import qualified Data.HashMap.Strict as HM
import Data.Text (Text)
import Data.Vector (Vector)
-import Data.Ceason
+import Data.Csv
type President = (Int, Text, ByteString, ByteString, ByteString, Text, Text)
View
12 ceason.cabal
@@ -18,13 +18,13 @@ Cabal-version: >=1.8
Library
- Exposed-modules: Data.Ceason
- Data.Ceason.Parser
+ Exposed-modules: Data.Csv
+ Data.Csv.Parser
- Other-modules: Data.Ceason.Conversion
- Data.Ceason.Conversion.Internal
- Data.Ceason.Encoding
- Data.Ceason.Types
+ Other-modules: Data.Csv.Conversion
+ Data.Csv.Conversion.Internal
+ Data.Csv.Encoding
+ Data.Csv.Types
Build-depends: array,
attoparsec >= 0.10.2,
View
2  tests/UnitTests.hs
@@ -21,7 +21,7 @@ import Test.Framework.Providers.HUnit as TF
import Test.QuickCheck
import Test.Framework.Providers.QuickCheck2 as TF
-import Data.Ceason
+import Data.Csv
------------------------------------------------------------------------
-- Parse tests
Please sign in to comment.
Something went wrong with that request. Please try again.