Kaynağa Gözat

Updates to match new dependencies

  * Add stack and LTS Haskell 5.2
  * Some updates based on hlint suggestions
  * Bump version and dependency versions
  * Rename the change log
tags/v0.2.0.0
Peter J. Jones 3 yıl önce
ebeveyn
işleme
050572cbaa
13 değiştirilmiş dosya ile 70 ekleme ve 44 silme
  1. 4
    0
      .gitignore
  2. 0
    3
      .gitmodules
  3. 0
    8
      CHANGELOG
  4. 15
    0
      CHANGES.md
  5. 14
    18
      GNUmakefile
  6. 1
    1
      LICENSE
  7. 13
    0
      build/nixpkgs.nix
  8. 9
    0
      build/stack.yaml
  9. 10
    8
      cassava-streams.cabal
  10. 1
    1
      src/System/IO/Streams/Csv/Encode.hs
  11. 0
    1
      src/System/IO/Streams/Csv/Tutorial.hs
  12. 3
    3
      test/test.hs
  13. 0
    1
      util

+ 4
- 0
.gitignore Dosyayı Görüntüle

@@ -2,3 +2,7 @@
/.cabal-sandbox
/cabal.sandbox.config
/test/massive.csv
/.stack-work
/build/.stack-work
/default.nix
/stack.yaml

+ 0
- 3
.gitmodules Dosyayı Görüntüle

@@ -1,3 +0,0 @@
[submodule "util"]
path = util
url = git://pmade.com/haskell-util

+ 0
- 8
CHANGELOG Dosyayı Görüntüle

@@ -1,8 +0,0 @@
2014-11-11 Peter Jones <pjones@devalot.com>

* System/IO/Streams/Csv/Decode.hs added more descriptive error messages.
* cassava-streams bumped version number (0.1.1.0).

2014-04-30 Peter Jones <pjones@devalot.com>

* cassava-streams initial release (version 0.1.0.0).

+ 15
- 0
CHANGES.md Dosyayı Görüntüle

@@ -0,0 +1,15 @@
# Change Log / Release Notes

## 0.2.0.0 (February 8, 2016)

* Compile with GHC 7.10.3
* Update dependency versions
* Build with stack and LTS Haskell 5.2

## 0.1.1.0 (November 11, 2014)

* `System/IO/Streams/Csv/Decode.hs` added more descriptive error messages.

## 0.1.0.0 (April 30, 2014)

* cassava-streams initial release

+ 14
- 18
GNUmakefile Dosyayı Görüntüle

@@ -1,27 +1,23 @@
################################################################################
# From util/haskell.mk (git submodule update --init)
CABAL_FLAGS = --enable-tests -fmaintainer -ftutorial
include util/haskell.mk
export TMPDIR = $(HOME)/tmp

################################################################################
CSV_HEADER = test/header.csv
CSV_MEGA = test/massive.csv
TUTORIAL = dist/build/tutorial/tutorial todo
PROF_OPTS = +RTS -sstderr -hc -pa -xc
TMP_DUMMY = $(TMPDIR)/.dummy
STACK_OPTS = --stack-yaml=build/stack.yaml

################################################################################
clean::
rm -f $(CSV_MEGA)
rm -f $(foreach e,aux hp pdf prof ps,tutorial.$(e))
.PHONY: all test clean

################################################################################
profile:: $(CSV_MEGA)
$(TUTORIAL) $(PROF_OPTS) < $(CSV_MEGA) > profile.stdout
hp2ps -M -b -c tutorial.hp
ps2pdf tutorial.ps
all: $(TMP_DUMMY)
stack $(STACK_OPTS) setup
stack $(STACK_OPTS) build
hlint src test

################################################################################
# Generate a very large CSV file for profiling.
$(CSV_MEGA): $(CSV_HEADER)
sh test/make-huge-csv.sh $@ $(CSV_HEADER)
du -h $@
test:
stack $(STACK_OPTS) test

################################################################################
clean:
stack $(STACK_OPTS) clean

+ 1
- 1
LICENSE Dosyayı Görüntüle

@@ -1,4 +1,4 @@
Copyright (c) 2014 Peter Jones <pjones@devalot.com>
Copyright (c) 2014-2016 Peter Jones <pjones@devalot.com>

All rights reserved.


+ 13
- 0
build/nixpkgs.nix Dosyayı Görüntüle

@@ -0,0 +1,13 @@
with (import <nixpkgs> {});

stdenv.mkDerivation {
name = "cassava-streams";

buildInputs = [
# GHC:
haskell.packages.lts-4_2.ghc

# Non-Haskell Dependencies:
zlib
];
}

+ 9
- 0
build/stack.yaml Dosyayı Görüntüle

@@ -0,0 +1,9 @@
resolver: lts-5.2

packages:
- ../

flags:
cassava-streams:
maintainer: true
tutorial: true

+ 10
- 8
cassava-streams.cabal Dosyayı Görüntüle

@@ -1,16 +1,16 @@
--------------------------------------------------------------------------------
name: cassava-streams
version: 0.1.1.0
version: 0.2.0.0
synopsis: io-streams interface for the cassava CSV library.
license: BSD3
license-file: LICENSE
author: Peter Jones <pjones@devalot.com>
maintainer: Peter Jones <pjones@devalot.com>
copyright: Copyright (c) 2014 Peter Jones
copyright: Copyright (c) 2014-2016 Peter Jones
category: Data, Text, CSV, IO-Streams
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==7.8.2, GHC==7.8.3
cabal-version: >=1.18
tested-with: GHC==7.10.3
homepage: https://github.com/pjones/cassava-streams
bug-reports: https://github.com/pjones/cassava-streams/issues
description:
@@ -22,8 +22,10 @@ description:
--------------------------------------------------------------------------------
extra-source-files:
README.md
CHANGELOG
test/simple.csv
CHANGES.md
test/*.csv
build/*.yaml
build/*.nix

--------------------------------------------------------------------------------
source-repository head
@@ -61,8 +63,8 @@ library
build-depends: base >= 4.6 && < 5.0
, bytestring >= 0.10 && < 0.11
, cassava >= 0.4 && < 0.5
, io-streams >= 1.1 && < 1.2
, vector >= 0.10 && < 0.11
, io-streams >= 1.1 && < 1.4
, vector >= 0.10 && < 0.12

--------------------------------------------------------------------------------
executable tutorial

+ 1
- 1
src/System/IO/Streams/Csv/Encode.hs Dosyayı Görüntüle

@@ -75,7 +75,7 @@ encodeStreamByNameWith :: ToNamedRecord a
-> IO (OutputStream a) -- ^ New @OutputStream@.
encodeStreamByNameWith opts hdr output = do
ref <- newIORef opts
makeOutputStream $ dispatch (\opts' -> encodeByNameWith opts' hdr) ref output
makeOutputStream $ dispatch (`encodeByNameWith` hdr) ref output

--------------------------------------------------------------------------------
-- | Encode records, ensuring that the header is written no more than once.

+ 0
- 1
src/System/IO/Streams/Csv/Tutorial.hs Dosyayı Görüntüle

@@ -30,7 +30,6 @@ module System.IO.Streams.Csv.Tutorial
) where

--------------------------------------------------------------------------------
import Control.Applicative
import Control.Monad
import Data.Csv
import qualified Data.Vector as V

+ 3
- 3
test/test.hs Dosyayı Görüntüle

@@ -19,7 +19,7 @@ module Main (main) where
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.Csv hiding (Record, NamedRecord, record)
import Data.Csv hiding (Record, NamedRecord, record, header)
import qualified Data.Vector as V
import System.IO.Streams (InputStream, OutputStream)
import qualified System.IO.Streams as Streams
@@ -96,8 +96,8 @@ prop_indexedRoundTrip recsIn = not (null recsIn) ==> monadicIO $ do
--------------------------------------------------------------------------------
tests :: TestTree
tests = testGroup "Tests"
[ QC.testProperty "namedRoundTrip" $ prop_namedRoundTrip
, QC.testProperty "indexedRoundTrip" $ prop_indexedRoundTrip
[ QC.testProperty "namedRoundTrip" prop_namedRoundTrip
, QC.testProperty "indexedRoundTrip" prop_indexedRoundTrip
]

--------------------------------------------------------------------------------

+ 0
- 1
util

@@ -1 +0,0 @@
Subproject commit 0abebb0ed57b28485a56380c0422dcec74cabc37

Loading…
İptal
Kaydet