Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09062351f5 | |||
| ab4137572e | |||
| c03a7ec18f | |||
|
|
df298f187e | ||
| 466c72924a | |||
| 9dfb803ba8 | |||
| de46a0c568 | |||
| d9ba67b6f0 | |||
| 9342abeb7a | |||
| e8cbc632c9 | |||
| c556a3d3e4 | |||
| 3aee719130 |
@@ -7,12 +7,18 @@ dist: trusty
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- env: CABALVER=1.18 GHCVER=7.6.3
|
||||||
|
addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=1.22 GHCVER=7.8.4
|
- env: CABALVER=1.22 GHCVER=7.8.4
|
||||||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.8.4], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [cabal-install-1.22,ghc-7.8.4], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=1.24 GHCVER=7.10.2
|
- env: CABALVER=1.24 GHCVER=7.10.2
|
||||||
addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.2], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.2], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=1.24 GHCVER=8.0.1
|
- env: CABALVER=1.24 GHCVER=8.0.1
|
||||||
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
|
||||||
|
- env: CABALVER=2.0 GHCVER=8.2.2
|
||||||
|
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
|
||||||
|
- env: CABALVER=2.2 GHCVER=8.4.1
|
||||||
|
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.1], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=head GHCVER=head
|
- env: CABALVER=head GHCVER=head
|
||||||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
0.9.2
|
||||||
|
* fix build with ghc-7.6
|
||||||
|
* raise required bytestring version
|
||||||
|
* Tighten base bound to prevent building before GHC 7.6 (by George Wilson)
|
||||||
|
0.9.1
|
||||||
|
* fix build with ghc-7.8 and 7.10
|
||||||
0.9.0
|
0.9.0
|
||||||
* don't force "Path Abs" anymore in IO module, abstract more over Path types
|
* don't force "Path Abs" anymore in IO module, abstract more over Path types
|
||||||
* add 'toAbs'
|
* add 'toAbs'
|
||||||
|
|||||||
22
hpath.cabal
22
hpath.cabal
@@ -1,5 +1,5 @@
|
|||||||
name: hpath
|
name: hpath
|
||||||
version: 0.9.0
|
version: 0.9.2
|
||||||
synopsis: Support for well-typed paths
|
synopsis: Support for well-typed paths
|
||||||
description: Support for well-typed paths, utilizing ByteString under the hood.
|
description: Support for well-typed paths, utilizing ByteString under the hood.
|
||||||
license: BSD3
|
license: BSD3
|
||||||
@@ -17,6 +17,9 @@ extra-source-files: README.md
|
|||||||
doctests-posix.hs
|
doctests-posix.hs
|
||||||
|
|
||||||
library
|
library
|
||||||
|
if os(windows)
|
||||||
|
build-depends: unbuildable<0
|
||||||
|
buildable: False
|
||||||
hs-source-dirs: src/
|
hs-source-dirs: src/
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
if impl(ghc >= 8.0)
|
if impl(ghc >= 8.0)
|
||||||
@@ -32,9 +35,9 @@ library
|
|||||||
System.Posix.FD,
|
System.Posix.FD,
|
||||||
System.Posix.FilePath
|
System.Posix.FilePath
|
||||||
other-modules: HPath.Internal
|
other-modules: HPath.Internal
|
||||||
build-depends: base >= 4.2 && <5
|
build-depends: base >= 4.6 && <5
|
||||||
, IfElse
|
, IfElse
|
||||||
, bytestring >= 0.9.2.0
|
, bytestring >= 0.10.0.0
|
||||||
, deepseq
|
, deepseq
|
||||||
, exceptions
|
, exceptions
|
||||||
, hspec
|
, hspec
|
||||||
@@ -46,6 +49,9 @@ library
|
|||||||
|
|
||||||
|
|
||||||
test-suite doctests-hpath
|
test-suite doctests-hpath
|
||||||
|
if os(windows)
|
||||||
|
build-depends: unbuildable<0
|
||||||
|
buildable: False
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
ghc-options: -threaded
|
ghc-options: -threaded
|
||||||
@@ -57,12 +63,15 @@ test-suite doctests-hpath
|
|||||||
, hpath
|
, hpath
|
||||||
|
|
||||||
test-suite doctests-posix
|
test-suite doctests-posix
|
||||||
|
if os(windows)
|
||||||
|
build-depends: unbuildable<0
|
||||||
|
buildable: False
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
ghc-options: -threaded
|
ghc-options: -threaded
|
||||||
main-is: doctests-posix.hs
|
main-is: doctests-posix.hs
|
||||||
build-depends: base,
|
build-depends: base,
|
||||||
bytestring,
|
bytestring >= 0.10.0.0,
|
||||||
unix,
|
unix,
|
||||||
hpath,
|
hpath,
|
||||||
doctest >= 0.8,
|
doctest >= 0.8,
|
||||||
@@ -70,6 +79,9 @@ test-suite doctests-posix
|
|||||||
QuickCheck
|
QuickCheck
|
||||||
|
|
||||||
test-suite spec
|
test-suite spec
|
||||||
|
if os(windows)
|
||||||
|
build-depends: unbuildable<0
|
||||||
|
buildable: False
|
||||||
Type: exitcode-stdio-1.0
|
Type: exitcode-stdio-1.0
|
||||||
Default-Language: Haskell2010
|
Default-Language: Haskell2010
|
||||||
Hs-Source-Dirs: test
|
Hs-Source-Dirs: test
|
||||||
@@ -106,7 +118,7 @@ test-suite spec
|
|||||||
Build-Depends: base
|
Build-Depends: base
|
||||||
, HUnit
|
, HUnit
|
||||||
, IfElse
|
, IfElse
|
||||||
, bytestring
|
, bytestring >= 0.10.0.0
|
||||||
, hpath
|
, hpath
|
||||||
, hspec >= 1.3
|
, hspec >= 1.3
|
||||||
, process
|
, process
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE EmptyDataDecls #-}
|
{-# LANGUAGE EmptyDataDecls #-}
|
||||||
|
#if __GLASGOW_HASKELL__ >= 708
|
||||||
{-# LANGUAGE PatternSynonyms #-}
|
{-# LANGUAGE PatternSynonyms #-}
|
||||||
|
#endif
|
||||||
|
|
||||||
module HPath
|
module HPath
|
||||||
(
|
(
|
||||||
@@ -25,8 +27,10 @@ module HPath
|
|||||||
,PathParseException
|
,PathParseException
|
||||||
,PathException
|
,PathException
|
||||||
,RelC
|
,RelC
|
||||||
|
#if __GLASGOW_HASKELL__ >= 708
|
||||||
-- * PatternSynonyms/ViewPatterns
|
-- * PatternSynonyms/ViewPatterns
|
||||||
,pattern Path
|
,pattern Path
|
||||||
|
#endif
|
||||||
-- * Path Parsing
|
-- * Path Parsing
|
||||||
,parseAbs
|
,parseAbs
|
||||||
,parseFn
|
,parseFn
|
||||||
@@ -101,7 +105,9 @@ instance RelC Fn
|
|||||||
#if __GLASGOW_HASKELL__ >= 710
|
#if __GLASGOW_HASKELL__ >= 710
|
||||||
pattern Path :: ByteString -> Path a
|
pattern Path :: ByteString -> Path a
|
||||||
#endif
|
#endif
|
||||||
|
#if __GLASGOW_HASKELL__ >= 708
|
||||||
pattern Path x <- (MkPath x)
|
pattern Path x <- (MkPath x)
|
||||||
|
#endif
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Path Parsers
|
-- Path Parsers
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
-- For other functions (like `copyFile`), the behavior on these file types is
|
-- For other functions (like `copyFile`), the behavior on these file types is
|
||||||
-- unreliable/unsafe. Check the documentation of those functions for details.
|
-- unreliable/unsafe. Check the documentation of those functions for details.
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE PackageImports #-}
|
{-# LANGUAGE PackageImports #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
@@ -107,7 +108,11 @@ import Data.ByteString
|
|||||||
(
|
(
|
||||||
ByteString
|
ByteString
|
||||||
)
|
)
|
||||||
|
#if MIN_VERSION_bytestring(0,10,2)
|
||||||
import Data.ByteString.Builder
|
import Data.ByteString.Builder
|
||||||
|
#else
|
||||||
|
import Data.ByteString.Lazy.Builder
|
||||||
|
#endif
|
||||||
(
|
(
|
||||||
Builder
|
Builder
|
||||||
, byteString
|
, byteString
|
||||||
@@ -136,6 +141,7 @@ import Data.Maybe
|
|||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
(
|
(
|
||||||
(<>)
|
(<>)
|
||||||
|
, mempty
|
||||||
)
|
)
|
||||||
import Data.Word
|
import Data.Word
|
||||||
(
|
(
|
||||||
@@ -933,7 +939,7 @@ readFileEOF (MkPath fp) =
|
|||||||
else do
|
else do
|
||||||
readBS <- unsafePackCStringFinalizer buf
|
readBS <- unsafePackCStringFinalizer buf
|
||||||
(fromIntegral size)
|
(fromIntegral size)
|
||||||
mempty
|
(return ())
|
||||||
read' fd buf (builder <> byteString readBS)
|
read' fd buf (builder <> byteString readBS)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user