packages feed

shake-ats 0.3.0.2 → 0.3.0.3

raw patch · 2 files changed

+8/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

shake-ats.cabal view
@@ -1,5 +1,5 @@ name:                shake-ats-version:             0.3.0.2+version:             0.3.0.3 synopsis:            Utilities for building ATS projects with shake description:         Various helper functions for building [ATS](http://www.ats-lang.org/) with the [shake](http://shakebuild.com/) library homepage:            https://github.com/vmchale/shake-ats#readme
src/Development/Shake/ATS.hs view
@@ -103,10 +103,10 @@         mapM_ ghcExport ((-<.> "") <$> hs)      out %> \_ -> do-        sources <- transitiveDeps [sourceFile]         h <- patsHome v'         h' <- pkgHome         let home = h ++ "lib/ats2-postiats-" ++ show v+        sources <- transitiveDeps (snd <$> atg) [sourceFile]         need (sources ++ hs)         copySources v v' sources         cmd_ ["mkdir", "-p", dropDirectory1 out]@@ -136,7 +136,7 @@  handleSource :: Version -> Version -> FilePath -> Action () handleSource v v' sourceFile = do-        sources <- transitiveDeps [sourceFile]+        sources <- transitiveDeps [] [sourceFile]         need sources         copySources v v' sources @@ -163,14 +163,14 @@ trim :: String -> String trim = init . drop 1 -transitiveDeps :: [FilePath] -> Action [FilePath]-transitiveDeps [] = pure []-transitiveDeps ps = fmap join $ forM ps $ \p -> do+transitiveDeps :: [FilePath] -> [FilePath] -> Action [FilePath]+transitiveDeps _ [] = pure []+transitiveDeps gen ps = fmap join $ forM ps $ \p -> if p `elem` gen then pure mempty else do     contents <- liftIO $ readFile p     let ats = fromRight mempty . parseATS . lexATS $ contents     let dir = takeDirectory p-    deps <- filterM doesFileExist $ fixDir dir . trim <$> getDependencies ats-    deps' <- transitiveDeps deps+    deps <- filterM (\f -> ((f `elem` gen) ||) <$> doesFileExist f) $ fixDir dir . trim <$> getDependencies ats+    deps' <- transitiveDeps gen deps     pure $ (p:deps) ++ deps'  -- | This uses @pats-filter@ to prettify the errors.