packages feed

shake-ext 0.3.1.1 → 0.3.1.2

raw patch · 2 files changed

+8/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

shake-ext.cabal view
@@ -1,5 +1,5 @@ name:                shake-ext-version:             0.3.1.1+version:             0.3.1.2 synopsis:            Helper functions for linting with shake  description:         This package provides several linters out of the box, as well as functionality for building ATS source files with [shake](http://shakebuild.com/). homepage:            https://hub.darcs.net/vmchale/shake-ext
src/Development/Shake/Linters.hs view
@@ -9,14 +9,20 @@                                  , module Development.Shake.FileDetect                                  ) where +import           Control.Composition+import           Data.Char                    (isSpace) import           Development.Shake import           Development.Shake.FileDetect +trim :: String -> String+trim = join fmap f+   where f = reverse . dropWhile isSpace+ checkIdempotent :: String -> FilePath -> Action () checkIdempotent s p = do     contents <- liftIO $ readFile p     (Stdout out) <- cmd (s ++ " " ++ p)-    if contents == out then pure () else error "formatter is not fully applied!"+    if trim contents == trim out then pure () else error "formatter is not fully applied!"  atsfmt :: [FilePath] -> Action () atsfmt = mapM_ (checkIdempotent "atsfmt")