Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct

- uses: actions/cache@v2
- uses: actions/cache@v3
name: Cache ~/.cabal/store and build files
with:
path: |
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
enable-stack: true
stack-version: latest

- uses: actions/cache@v2
- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: |
Expand Down
10 changes: 5 additions & 5 deletions haskey.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ library
bytestring >=0.10 && <1,
containers >=0.5 && <1,
directory >=1.2 && <2,
exceptions >=0.8.3 && <0.11,
exceptions >=0.8.3 && <0.12,
filepath >=1.4 && <2,
focus >=0.1.2 && <0.2 || >= 1.0 && < 1.1,
haskey-btree >=0.3.0.0 && <0.4,
Expand All @@ -71,9 +71,9 @@ library
mtl >=2.1 && <3,
semigroups >=0.12 && <1,
stm >=2.1 && <3,
stm-containers >=0.2 && <1 || >= 1.1 && < 1.2,
stm-containers >=0.2 && <1 || >= 1.1 && < 1.3,
transformers >=0.3 && <1,
unix >=2.7.1.0 && <3,
unix >=2.7.1.0 && <2.9,
xxhash-ffi >=0.1.0.1 && <1,
hashable

Expand Down Expand Up @@ -122,7 +122,7 @@ test-suite haskey-integration
bytestring >=0.10 && <1,
containers >=0.5 && <1,
directory >=1.2 && <2,
exceptions >=0.8.3 && <0.11,
exceptions >=0.8.3 && <0.12,
mtl >=2.1 && <3,
transformers >=0.3 && <1,
temporary >=1.2 && <1.4,
Expand Down Expand Up @@ -151,7 +151,7 @@ test-suite haskey-example
async >=2.1 && <3,
bytestring >=0.6 && <0.9 || >0.9 && <1,
directory >=1.2 && <2,
exceptions >=0.8.3 && <0.11,
exceptions >=0.8.3 && <0.12,
random >=1.1 && <2,
text >=1.2 && <2

Expand Down
6 changes: 3 additions & 3 deletions src-unix/FileIO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module FileIO (
import Prelude hiding (read)
import qualified Prelude as P

import Control.Applicative ((<$>))
import Control.Exception (SomeException(..), throw, try)
import Control.Monad (void)

Expand All @@ -42,6 +41,7 @@ import System.Posix (Fd,
fileSynchronise,
closeFd,
OpenMode(ReadWrite),
OpenFileFlags(..),
exclusive, trunc,
defaultFileFlags,
stdFileMode)
Expand All @@ -61,7 +61,7 @@ newtype FHandle = FHandle Fd
-- | Open the specified file in read-write mode.
openReadWrite :: FilePath -> IO FHandle
openReadWrite filename =
FHandle <$> openFd filename ReadWrite (Just stdFileMode) defaultFileFlags
FHandle <$> openFd filename ReadWrite (defaultFileFlags { creat = Just stdFileMode })

-- | Write **at most** the specified amount of bytes to a handle.
write :: FHandle -> Ptr Word8 -> Word64 -> IO Word64
Expand Down Expand Up @@ -174,7 +174,7 @@ checkBreakError e | SE.isDoesNotExistError e = return ()
takeLock :: FilePath -> IO PrefixLock
takeLock fp = do
createDirectoryIfMissing True (takeDirectory fp)
h <- openFd fp ReadWrite (Just 0o600) (defaultFileFlags {exclusive = True, trunc = True}) >>= fdToHandle
h <- openFd fp ReadWrite (defaultFileFlags {creat = Just stdFileMode, exclusive = True, trunc = True}) >>= fdToHandle
pid <- getProcessID
hPrint h pid >> hClose h
-- Read back our own lock and make sure its still ours
Expand Down
5 changes: 2 additions & 3 deletions src/Database/Haskey/Store/File.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module Database.Haskey.Store.File (
, WrongOverflowValueError(..)
) where

import Control.Applicative (Applicative, (<$>))
import Control.Applicative (Applicative)
import Control.Monad
import Control.Monad.Catch
import Control.Monad.IO.Class
Expand All @@ -39,7 +39,6 @@ import Control.Monad.Trans.State.Strict ( StateT, evalStateT)

import Data.Map (Map)
import Data.Maybe (fromJust)
import Data.Monoid ((<>))
import Data.Typeable (Typeable, cast)
import Data.Word (Word64)
import qualified Data.ByteString.Lazy as BL
Expand All @@ -49,7 +48,7 @@ import qualified FileIO as IO

import System.Directory (createDirectoryIfMissing, removeFile, getDirectoryContents)
import System.FilePath (takeDirectory)
import System.IO.Error (ioError, isDoesNotExistError)
import System.IO.Error (isDoesNotExistError)

import Data.BTree.Impure.Internal.Structures
import Data.BTree.Primitives
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Haskey/Store/InMemory.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module Database.Haskey.Store.InMemory (
, WrongOverflowValueError(..)
) where

import Control.Applicative (Applicative, (<$>))
import Control.Applicative (Applicative)
import Control.Concurrent.MVar
import Control.Monad
import Control.Monad.Catch
Expand Down
1 change: 0 additions & 1 deletion src/Database/Haskey/Store/Page.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module Database.Haskey.Store.Page where

import Codec.Compression.LZ4

import Control.Applicative ((<$>))
import Control.Monad.Catch

import Data.Binary (Binary(..), Put, Get)
Expand Down
3 changes: 2 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-9.0
resolver: lts-22.44
packages:
- '.'
extra-deps:
Expand All @@ -10,3 +10,4 @@ extra-deps:
- xxhash-ffi-0.2.0.0
flags: {}
extra-package-dbs: []
allow-newer: true
44 changes: 44 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/topics/lock_files

packages:
- completed:
commit: 4ff3a73d8eb480902478772f1be5515967624ff6
git: https://github.com/haskell-haskey/haskey-btree
name: haskey-btree
pantry-tree:
sha256: 498f1d5f7f2be3ab180f345f4a8647ecf04b417be62094e6dbdcfe1337890fbe
size: 3355
version: 0.3.0.0
original:
commit: 4ff3a73d8eb480902478772f1be5515967624ff6
git: https://github.com/haskell-haskey/haskey-btree
- completed:
hackage: lz4-0.2.3.1@sha256:9d286f1c8e3e3aab86ebb8cd39b485af57c0a05d9da5baf921641012a3c83cf0,1821
pantry-tree:
sha256: 3a3c17d888e05430d441ddaef9cd3e350321dd7a1c60128efed92814d8dd65e3
size: 666
original:
hackage: lz4-0.2.3.1
- completed:
hackage: numerals-0.4.1@sha256:f138b4a0efbde3b3c6cbccb788eff683cb8a5d046f449729712fd174c5ee8a78,11430
pantry-tree:
sha256: c616791b08f1792fd1d4ca03c6d2c773dedb25b24b66454c97864aefd85a5d0a
size: 13751
original:
hackage: numerals-0.4.1
- completed:
hackage: xxhash-ffi-0.2.0.0@sha256:0b4c4fc2730dcfd5216be19a4a00bac172bcd522b18777dab23fda954feedf96,2067
pantry-tree:
sha256: 3099ccadce40020ac34f76674427a801aad8518a2173d5ef1f444901f317e347
size: 565
original:
hackage: xxhash-ffi-0.2.0.0
snapshots:
- completed:
sha256: 238fa745b64f91184f9aa518fe04bdde6552533d169b0da5256670df83a0f1a9
size: 721141
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/44.yaml
original: lts-22.44
1 change: 1 addition & 0 deletions tests/Integration/WriteOpenRead/Transactions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Integration.WriteOpenRead.Transactions where
import Test.QuickCheck

import Control.Applicative ((<$>), (<*>), pure)
import Control.Monad (replicateM)
import Control.Monad.State

import Data.Foldable (foldlM)
Expand Down