Skip to content
Snippets Groups Projects
Unverified Commit 56c5d4c8 authored by Neil Mitchell's avatar Neil Mitchell Committed by GitHub
Browse files

Merge branch 'master' into wip/bump-base

parents 7cb3dc28 9b85e739
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
import qualified System.FilePath.Windows as W import qualified System.FilePath.Windows as W
import qualified System.FilePath.Posix as P import qualified System.FilePath.Posix as P
:def docs_ const $ return ":!cabal haddock" :def docs_ const $ pure ":!cabal haddock"
:def docs const $ return $ unlines [":docs_",":!start dist\\doc\\html\\filepath\\System-FilePath.html"] :def docs const $ pure $ unlines [":docs_",":!start dist\\doc\\html\\filepath\\System-FilePath.html"]
:def gen const $ return "Generate.main" :def gen const $ pure "Generate.main"
:def test \x -> return $ if null x then "Test.main" else "System.Environment.withArgs [" ++ show x ++ "] Test.main" :def test \x -> pure $ if null x then "Test.main" else "System.Environment.withArgs [" ++ show x ++ "] Test.main"
:def go \x -> return $ unlines [":reload",":gen",":reload",":test " ++ x,":gen",":reload"] :def go \x -> pure $ unlines [":reload",":gen",":reload",":test " ++ x,":gen",":reload"]
:def testfull const $ return $ unlines [":reload","gen",":reload","!cabal test"] :def testfull const $ pure $ unlines [":reload","gen",":reload","!cabal test"]
...@@ -7,3 +7,9 @@ ...@@ -7,3 +7,9 @@
# We use [Char] because sometimes we really are talking about a set of Char. # We use [Char] because sometimes we really are talking about a set of Char.
- ignore: {name: "Use String"} - ignore: {name: "Use String"}
# We don't use the extra library
- ignore: {name: "Use drop1"}
- ignore: {name: "Use upper"}
- ignore: {name: "Use lower"}
- ignore: {name: "Use zipFrom"}
sudo: required language: minimal
env: env:
- GHCVER=7.10
- GHCVER=8.0 - GHCVER=8.0
- GHCVER=8.2 - GHCVER=8.2
- GHCVER=8.4 - GHCVER=8.4
- GHCVER=8.6 - GHCVER=8.6
- GHCVER=8.8
- GHCVER=8.10
- GHCVER=head - GHCVER=head
script: script:
......
...@@ -100,11 +100,11 @@ readFileBinary' :: FilePath -> IO String ...@@ -100,11 +100,11 @@ readFileBinary' :: FilePath -> IO String
readFileBinary' file = withBinaryFile file ReadMode $ \h -> do readFileBinary' file = withBinaryFile file ReadMode $ \h -> do
s <- hGetContents h s <- hGetContents h
evaluate $ length s evaluate $ length s
return s pure s
writeFileBinaryChanged :: FilePath -> String -> IO () writeFileBinaryChanged :: FilePath -> String -> IO ()
writeFileBinaryChanged file x = do writeFileBinaryChanged file x = do
b <- doesFileExist file b <- doesFileExist file
old <- if b then fmap Just $ readFileBinary' file else return Nothing old <- if b then fmap Just $ readFileBinary' file else pure Nothing
when (Just x /= old) $ when (Just x /= old) $
writeFileBinary file x writeFileBinary file x
Copyright Neil Mitchell 2005-2019. Copyright Neil Mitchell 2005-2020.
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
......
# FilePath [![Hackage version](https://img.shields.io/hackage/v/filepath.svg?label=Hackage)](https://hackage.haskell.org/package/filepath) [![Linux Build Status](https://img.shields.io/travis/haskell/filepath/master.svg?label=Linux%20build)](https://travis-ci.org/haskell/filepath) [![Windows Build Status](https://img.shields.io/appveyor/ci/ndmitchell/filepath/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/ndmitchell/filepath) # FilePath [![Hackage version](https://img.shields.io/hackage/v/filepath.svg?label=Hackage)](https://hackage.haskell.org/package/filepath) [![Linux build status](https://img.shields.io/travis/haskell/filepath/master.svg?label=Linux%20build)](https://travis-ci.org/haskell/filepath) [![Windows build status](https://img.shields.io/appveyor/ci/ndmitchell/filepath/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/ndmitchell/filepath)
The `filepath` package provides functionality for manipulating `FilePath` values, and is shipped with both [GHC](https://www.haskell.org/ghc/) and the [Haskell Platform](https://www.haskell.org/platform/). It provides three modules: The `filepath` package provides functionality for manipulating `FilePath` values, and is shipped with both [GHC](https://www.haskell.org/ghc/) and the [Haskell Platform](https://www.haskell.org/platform/). It provides three modules:
......
build: off
cache: "c:\\sr -> appveyor.yml"
test_script:
- ps: Invoke-Expression (Invoke-WebRequest 'https://raw.githubusercontent.com/ndmitchell/neil/master/appveyor.ps1')
- stack runghc Generate.hs
...@@ -6,13 +6,13 @@ license: BSD3 ...@@ -6,13 +6,13 @@ license: BSD3
license-file: LICENSE license-file: LICENSE
author: Neil Mitchell <ndmitchell@gmail.com> author: Neil Mitchell <ndmitchell@gmail.com>
maintainer: Neil Mitchell <ndmitchell@gmail.com> maintainer: Neil Mitchell <ndmitchell@gmail.com>
copyright: Neil Mitchell 2005-2019 copyright: Neil Mitchell 2005-2020
bug-reports: https://github.com/haskell/filepath/issues bug-reports: https://github.com/haskell/filepath/issues
homepage: https://github.com/haskell/filepath#readme homepage: https://github.com/haskell/filepath#readme
category: System category: System
build-type: Simple build-type: Simple
synopsis: Library for manipulating FilePaths in a cross platform way. synopsis: Library for manipulating FilePaths in a cross platform way.
tested-with: GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3 tested-with: GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2
description: description:
This package provides functionality for manipulating @FilePath@ values, and is shipped with both <https://www.haskell.org/ghc/ GHC> and the <https://www.haskell.org/platform/ Haskell Platform>. It provides three modules: This package provides functionality for manipulating @FilePath@ values, and is shipped with both <https://www.haskell.org/ghc/ GHC> and the <https://www.haskell.org/platform/ Haskell Platform>. It provides three modules:
. .
...@@ -48,7 +48,7 @@ library ...@@ -48,7 +48,7 @@ library
System.FilePath.Windows System.FilePath.Windows
build-depends: build-depends:
base >= 4 && < 4.16 base >= 4.9 && < 4.16
ghc-options: -Wall ghc-options: -Wall
...@@ -64,4 +64,4 @@ test-suite filepath-tests ...@@ -64,4 +64,4 @@ test-suite filepath-tests
build-depends: build-depends:
filepath, filepath,
base, base,
QuickCheck >= 2.7 && < 2.13 QuickCheck >= 2.7 && < 2.14
...@@ -19,8 +19,8 @@ main = do ...@@ -19,8 +19,8 @@ main = do
putStrLn $ "Test " ++ show i ++ " of " ++ show total ++ ": " ++ msg putStrLn $ "Test " ++ show i ++ " of " ++ show total ++ ": " ++ msg
res <- quickCheckWithResult stdArgs{chatty=False, maxSuccess=count} prop res <- quickCheckWithResult stdArgs{chatty=False, maxSuccess=count} prop
case res of case res of
Success{} -> return Nothing Success{} -> pure Nothing
bad -> do putStrLn $ showOutput bad; putStrLn "TEST FAILURE!"; return $ Just (msg,bad) bad -> do putStrLn $ showOutput bad; putStrLn "TEST FAILURE!"; pure $ Just (msg,bad)
if null bad then if null bad then
putStrLn $ "Success, " ++ show total ++ " tests passed" putStrLn $ "Success, " ++ show total ++ " tests passed"
else do else do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment