packages feed

shake-futhark 0.1.0.2 → 0.2.0.0

raw patch · 3 files changed

+11/−4 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # shake-futhark +## 0.2.0.0++  * Interleave `need`s+ ## 0.1.0.2    * Nice-ify paths before `need`-ing them
shake-futhark.cabal view
@@ -1,6 +1,6 @@ cabal-version:   1.18 name:            shake-futhark-version:         0.1.0.2+version:         0.2.0.0 license:         BSD3 license-file:    LICENSE copyright:       Copyright: (c) 2020 Vanessa McHale
src/Development/Shake/Futhark.hs view
@@ -6,8 +6,9 @@ import           Control.Monad             ((<=<)) import           Control.Monad.IO.Class    (liftIO) import           Data.Containers.ListUtils (nubOrd)+import           Data.Foldable             (traverse_) import qualified Data.Text.IO              as TIO-import           Development.Shake         (Action, need)+import           Development.Shake         (Action, need, traced) import           Language.Futhark.Parser   (parseFuthark) import           Language.Futhark.Syntax   (DecBase (..), ModBindBase (ModBind), ModExpBase (..), ProgBase (Prog)) import           System.Directory          (canonicalizePath, makeRelativeToCurrentDirectory)@@ -15,8 +16,10 @@  -- | @'need'@ a file and all its dependencies needFut :: [FilePath] -> Action ()-needFut fps =-    need =<< liftIO (mconcat . (fps :) <$> traverse getAllFutDeps fps)+needFut fps = do+    next <- traced "getFutDeps" $ traverse getFutDeps fps+    need (concat next)+    traverse_ needFut next  getFutDeps :: FilePath -> IO [FilePath] getFutDeps fp = traverse canonicalizeRelative =<< do