system-filepath 0.4.8 → 0.4.9
raw patch · 4 files changed
+26/−12 lines, 4 filesdep ~textbuild-type:Customsetup-changed
Dependency ranges changed: text
Files
- Setup.hs +12/−2
- lib/Filesystem/Path.hs +2/−2
- lib/Filesystem/Path/CurrentOS.hs +8/−4
- system-filepath.cabal +4/−4
Setup.hs view
@@ -1,2 +1,12 @@-import Distribution.Simple-main = defaultMain+import qualified Distribution.Simple as Simple+import qualified Distribution.Simple.LocalBuildInfo as LocalBuildInfo+import qualified Distribution.Simple.Program as Program++main :: IO ()+main = Simple.defaultMainWithHooks hooks where+ hooks = Simple.simpleUserHooks+ { Simple.haddockHook = myHaddockHook+ }+ myHaddockHook pkg lbi = Simple.haddockHook Simple.simpleUserHooks pkg (lbi+ { LocalBuildInfo.withPrograms = Program.userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (LocalBuildInfo.withPrograms lbi)+ })
lib/Filesystem/Path.hs view
@@ -216,8 +216,8 @@ -- | Remove a prefix from a path. -- -- @--- 'stripPrefix' \"/foo/\" \"/foo/bar/baz.txt\" == Just \"bar/baz.txt\"--- 'stripPrefix' \"/foo/\" \"/bar/baz.txt\" == Nothing+-- 'stripPrefix' \"\/foo\/\" \"\/foo\/bar\/baz.txt\" == Just \"bar\/baz.txt\"+-- 'stripPrefix' \"\/foo\/\" \"\/bar\/baz.txt\" == Nothing -- @ -- -- Since: 0.4.1
lib/Filesystem/Path/CurrentOS.hs view
@@ -41,14 +41,18 @@ import qualified Filesystem.Path as F import qualified Filesystem.Path.Rules as R -#if defined(CABAL_OS_WINDOWS) || defined(CABAL_OS_DARWIN)-#define PLATFORM_PATH_FORMAT T.Text+#if defined(__HADDOCK__)+# define PLATFORM_PATH_FORMAT platformTextFormat+#elif defined(CABAL_OS_WINDOWS) || defined(CABAL_OS_DARWIN)+# define PLATFORM_PATH_FORMAT T.Text #else-#define PLATFORM_PATH_FORMAT B.ByteString+# define PLATFORM_PATH_FORMAT B.ByteString #endif currentOS :: R.Rules PLATFORM_PATH_FORMAT-#if defined(CABAL_OS_WINDOWS)+#if defined(__HADDOCK__)+currentOS = undefined+#elif defined(CABAL_OS_WINDOWS) currentOS = R.windows #elif defined(CABAL_OS_DARWIN) #if __GLASGOW_HASKELL__ >= 702
system-filepath.cabal view
@@ -1,12 +1,12 @@ name: system-filepath-version: 0.4.8+version: 0.4.9 synopsis: High-level, byte-based file and directory path manipulations license: MIT license-file: license.txt author: John Millikin <jmillikin@gmail.com> maintainer: John Millikin <jmillikin@gmail.com> copyright: John Millikin 2010-2012-build-type: Simple+build-type: Custom cabal-version: >= 1.6 category: System stability: experimental@@ -29,7 +29,7 @@ source-repository this type: git location: https://john-millikin.com/code/haskell-filesystem/- tag: system-filepath_0.4.8+ tag: system-filepath_0.4.9 library ghc-options: -Wall -O2@@ -39,7 +39,7 @@ base >= 4.0 && < 5.0 , bytestring >= 0.9 , deepseq >= 1.1 && < 1.4- , text >= 0.7.1 && < 0.12+ , text >= 0.7.1 if os(windows) cpp-options: -DCABAL_OS_WINDOWS