shake-ext 0.5.0.4 → 1.0.0.0
raw patch · 2 files changed
+13/−6 lines, 2 filesdep +mtlPVP ok
version bump matches the API change (PVP)
Dependencies added: mtl
API changes (from Hackage documentation)
Files
- shake-ext.cabal +2/−1
- src/Development/Shake/ATS.hs +11/−5
shake-ext.cabal view
@@ -1,5 +1,5 @@ name: shake-ext-version: 0.5.0.4+version: 1.0.0.0 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@@ -30,6 +30,7 @@ build-depends: base >= 4.10 && < 5 , shake , language-ats+ , mtl , composition-prelude , directory default-language: Haskell2010
src/Development/Shake/ATS.hs view
@@ -14,7 +14,8 @@ , Version (..) ) where -import Control.Monad (filterM, forM_)+import Control.Monad+import Control.Monad.IO.Class import Data.Either (fromRight) import Data.Maybe (fromMaybe) import Data.Semigroup (Semigroup (..))@@ -51,8 +52,10 @@ atsBin :: Version -> Bool -> [String] -> String -> String -> Rules () atsBin v gc libs sourceFile out = do - priority 0.75 $ out %> \_ -> do- need [sourceFile]+ atsDeps++ out %> \_ -> do+ need [sourceFile] --sources let home = "/usr/local/lib/ats2-postiats-" ++ show v cmd_ ["mkdir", "-p", dropDirectory1 out] let toLibs = fmap ("-l" <>)@@ -88,13 +91,16 @@ need [sourceFile] atsCommand version sourceFile out +trim :: String -> String+trim = init . drop 1+ atsDeps :: Rules ()-atsDeps = priority 0.25 $+atsDeps = ["//*.dats", "//*.sats"] |%> \out -> do contents <- liftIO $ readFile out let ats = fromRight mempty . parseATS . lexATS $ contents- deps <- filterM doesFileExist $ getDependencies ats+ deps <- filterM doesFileExist $ trim <$> getDependencies ats need deps home <- patsHome forM_ deps $ \dep ->