~singpolyma/tokyocabinet-haskell

af8273e0c45915ec74cbfdd088b21f12046c9de6 — Stephen Paul Weber 4 months ago 092c4e9
Let cabal know about the tests, and fix warnings
M Database/TokyoCabinet.hs => Database/TokyoCabinet.hs +0 -1
@@ 27,7 27,6 @@ import qualified Database.TokyoCabinet.BDB as B
import qualified Database.TokyoCabinet.BDB.Cursor as C
import qualified Database.TokyoCabinet.Error as E

import Data.Int
import Data.Word

-- $doc

M Database/TokyoCabinet/Associative.hs => Database/TokyoCabinet/Associative.hs +0 -2
@@ 1,7 1,5 @@
module Database.TokyoCabinet.Associative where

import Data.Maybe

import Foreign.Ptr
import Foreign.ForeignPtr


M Database/TokyoCabinet/Error.hsc => Database/TokyoCabinet/Error.hsc +0 -1
@@ 12,7 12,6 @@ module Database.TokyoCabinet.Error
    ) where

import System.IO.Unsafe (unsafePerformIO)
import Foreign
import Foreign.C.Types
import Foreign.C.String


M Database/TokyoCabinet/List/C.hs => Database/TokyoCabinet/List/C.hs +0 -1
@@ 1,4 1,3 @@
{-# INCLUDE <tcutil.h> #-}
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
module Database.TokyoCabinet.List.C where


M Database/TokyoCabinet/Map/C.hs => Database/TokyoCabinet/Map/C.hs +0 -1
@@ 1,4 1,3 @@
{-# INCLUDE <tcutil.h> #-}
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
module Database.TokyoCabinet.Map.C where


M tokyocabinet-haskell.cabal => tokyocabinet-haskell.cabal +116 -109
@@ 1,6 1,6 @@
Name:           tokyocabinet-haskell
Version:        0.0.5
Cabal-Version:  >= 1.6
Cabal-Version:  >= 1.10
License:        BSD3
License-File:   LICENSE
Author:         Tom Tsuruhara


@@ 25,12 25,9 @@ Source-Repository head
  type: git
  location: git://github.com/tom-lpsd/tokyocabinet-haskell.git

Flag BuildTest
  Description:  make tests and install it if True
  Default:      False

Library
  Build-Depends:        base >= 4.0, bytestring >= 0.9, mtl >= 1.1
  Default-Language:     Haskell2010
  Build-Depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, mtl >= 1.1
  Exposed-modules:
    Database.TokyoCabinet
    Database.TokyoCabinet.HDB


@@ 59,7 56,7 @@ Library

  Other-modules:
    Database.TokyoCabinet.Internal
  Extensions:           CPP, ForeignFunctionInterface,
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances,
                        GeneralizedNewtypeDeriving
  Extra-libraries:      tokyocabinet


@@ 67,63 64,62 @@ Library
  Include-dirs:         /usr/local/include
  GHC-Options:          -Wall

Executable ListTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite ListTest
  Default-Language:     Haskell2010
  Main-Is:              tests/ListTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Storable

Executable MapTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite MapTest
  Default-Language:     Haskell2010
  Main-Is:              tests/MapTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable

Executable HDBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite HDBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/HDBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2, base >= 4.0, directory >= 1.0
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.HDB
    Database.TokyoCabinet.HDB.C
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable

Executable BDBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite BDBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/BDBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2, base >= 4.0, directory >= 1.0
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil


@@ 132,81 128,87 @@ Executable BDBTest
    Database.TokyoCabinet.BDB.Cursor
    Database.TokyoCabinet.BDB.Cursor.C
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable

Executable FDBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite FDBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/FDBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.FDB
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.FDB.Key
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable

Executable TDBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite TDBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/TDBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    TestUtil
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C

Executable TDBQRYTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite TDBQRYTest
  Default-Language:     Haskell2010
  Main-Is:              tests/TDBQRYTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    Database.TokyoCabinet.TDB.Query
    Database.TokyoCabinet.TDB.Query.C
    TestUtil
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet.FDB.Key
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    Database.TokyoCabinet.TDB.Query
    Database.TokyoCabinet.TDB.Query.C

Executable ADBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite ADBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/ADBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2, base >= 4.0, directory >= 1.0
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil


@@ 216,64 218,69 @@ Executable ADBTest
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Internal

Executable TCDBTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite TCDBTest
  Default-Language:     Haskell2010
  Main-Is:              tests/TCDBTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2, base >= 4.0, directory >= 1.0
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil
    Database.TokyoCabinet
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    Database.TokyoCabinet.HDB
    Database.TokyoCabinet.HDB.C
    Database.TokyoCabinet.FDB
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.BDB
    Database.TokyoCabinet.BDB.C
    Database.TokyoCabinet.BDB.Cursor
    Database.TokyoCabinet.BDB.Cursor.C
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.FDB
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet.FDB.Key
    Database.TokyoCabinet.HDB
    Database.TokyoCabinet.HDB.C
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C

Executable StorableTest
  if flag(BuildTest)
    Buildable:            True
  else
    Buildable:            False
test-suite StorableTest
  Default-Language:     Haskell2010
  Main-Is:              tests/StorableTest.hs
  Type:                 exitcode-stdio-1.0
  Extra-libraries:      tokyocabinet
  Build-depends:        HUnit >= 1.2, base >= 4.0, directory >= 1.0
  Extensions:           CPP, ForeignFunctionInterface,
  Build-depends:        base >= 4.0 && < 4.12, bytestring >= 0.9, HUnit >= 1.2, directory >= 1.0, mtl >= 1.1
  Default-Extensions:   CPP, ForeignFunctionInterface,
                        EmptyDataDecls, TypeSynonymInstances
  Other-modules:
    TestUtil
    Database.TokyoCabinet.HDB
    Database.TokyoCabinet.HDB.C
    Database.TokyoCabinet.FDB
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet
    Database.TokyoCabinet.Associative
    Database.TokyoCabinet.BDB
    Database.TokyoCabinet.BDB.C
    Database.TokyoCabinet.BDB.Cursor
    Database.TokyoCabinet.BDB.Cursor.C
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C
    Database.TokyoCabinet.Error
    Database.TokyoCabinet.FDB
    Database.TokyoCabinet.FDB.C
    Database.TokyoCabinet.FDB.Key
    Database.TokyoCabinet.HDB
    Database.TokyoCabinet.HDB.C
    Database.TokyoCabinet.Internal
    Database.TokyoCabinet.List
    Database.TokyoCabinet.List.C
    Database.TokyoCabinet.Map
    Database.TokyoCabinet.Map.C
    Database.TokyoCabinet.Sequence
    Database.TokyoCabinet.Storable
    Database.TokyoCabinet.TDB
    Database.TokyoCabinet.TDB.C