zifter 0.0.1.3 → 0.0.1.4
raw patch · 3 files changed
+33/−11 lines, 3 filesdep +colourdep ~QuickCheckdep ~ansi-terminaldep ~optparse-applicativePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: colour
Dependency ranges changed: QuickCheck, ansi-terminal, optparse-applicative, path, path-io, process
API changes (from Hackage documentation)
- Zifter.Zift: liftIO :: MonadIO m => forall a. IO a -> m a
+ Zifter.Zift: liftIO :: MonadIO m => forall a. () => IO a -> m a
Files
- src/Zifter/Recurse.hs +4/−4
- test/Zifter/Zift/Gen.hs +21/−0
- zifter.cabal +8/−7
src/Zifter/Recurse.hs view
@@ -110,8 +110,8 @@ findZiftFilesRecursively = do rd <- getRootDir let filterZiftFiles = filter ((== $(mkRelFile "zift.hs")) . filename) -- TODO generalise to given predicate- let recurser absdir dirs files =- if absdir == rd+ let recurser ad dirs files =+ if ad == rd then pure $ WalkExclude [] else do let ziftFiles = filterZiftFiles files@@ -119,9 +119,9 @@ [] -> pure $ WalkExclude [] -- No zift files found, recurse further downward. -- Zift files found, run each of them but don't recurse further. That's their job. _ -> pure $ WalkExclude dirs- let outputWriter absdir _ files =+ let outputWriter ad _ files = pure $- if absdir == rd+ if ad == rd then [] else filterZiftFiles files walkDirAccum (Just recurser) outputWriter rd
test/Zifter/Zift/Gen.hs view
@@ -1,12 +1,15 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} module Zifter.Zift.Gen where import GHC.Generics +import Data.Colour.SRGB import Data.GenValidity+import Data.Monoid import System.Console.ANSI @@ -45,6 +48,24 @@ instance GenUnchecked ZiftOutput instance GenUnchecked ZiftState++instance (Validity a) => Validity (RGB a) where+ validate RGB {..} =+ (channelRed <?!> "channelRed") <> (channelGreen <?!> "channelGreen") <>+ (channelBlue <?!> "channelBlue")+ isValid = isValidByValidating++instance (Ord a, Floating a, GenUnchecked a) => GenUnchecked (Colour a) where+ genUnchecked = sRGB24 <$> genUnchecked <*> genUnchecked <*> genUnchecked+ shrinkUnchecked _ = []++instance (Floating a, RealFrac a, Validity a) => Validity (Colour a) where+ isValid = isValid . toSRGB24+ validate = validateByChecking "Colour"++instance (Ord a, Floating a, RealFrac a, GenValid a) =>+ GenValid (Colour a) where+ genValid = sRGB24 <$> genValid <*> genValid <*> genValid instance GenUnchecked a => GenUnchecked (ZiftResult a) where genUnchecked = ZiftSuccess <$> genUnchecked
zifter.cabal view
@@ -1,5 +1,5 @@ name: zifter-version: 0.0.1.3+version: 0.0.1.4 cabal-version: >=1.10 build-type: Simple license: MIT@@ -28,15 +28,15 @@ Zifter.Zift.Types build-depends: base >=4.9 && <=5,- ansi-terminal >=0.6 && <0.7,+ ansi-terminal >=0.6 && <0.8, async >=2.1 && <2.2, directory >=1.2 && <1.4, exceptions >=0.8 && <0.9, filepath >=1.4 && <1.5,- optparse-applicative >=0.13 && <0.14,- path >=0.5 && <0.6,- path-io >1.2 && <1.3,- process >=1.4 && <1.6,+ optparse-applicative >=0.13 && <0.15,+ path >=0.5 && <0.7,+ path-io >1.2 && <1.4,+ process >=1.4 && <1.7, safe >=0.3 && <0.4, stm >=2.4 && <2.5, validity >=0.3 && <0.5,@@ -51,7 +51,8 @@ build-depends: base >=4.9 && <=5, zifter -any,- QuickCheck >=2.9 && <2.10,+ QuickCheck >=2.9 && <2.11,+ colour >=2.3 && <2.4, genvalidity >=0.3 && <0.5, genvalidity-hspec >=0.3 && <0.6, genvalidity-path >=0.1 && <0.3,