packages feed

shake-futhark 0.2.0.0 → 0.2.0.1

raw patch · 4 files changed

+16/−12 lines, 4 filesdep ~futharkPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: futhark

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # shake-futhark +## 0.2.0.1++  * Compatibility with futhark >=0.21.8+ ## 0.2.0.0    * Interleave `need`s
LICENSE view
@@ -1,4 +1,4 @@-Copyright Vanessa McHale (c) 2020+Copyright Vanessa McHale (c) 2020, 2022  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 
shake-futhark.cabal view
@@ -1,9 +1,9 @@ cabal-version:   1.18 name:            shake-futhark-version:         0.2.0.0+version:         0.2.0.1 license:         BSD3 license-file:    LICENSE-copyright:       Copyright: (c) 2020 Vanessa McHale+copyright:       Copyright: (c) 2020, 2022 Vanessa McHale maintainer:      vamchale@gmail.com author:          Vanessa McHale synopsis:        Dependency tracking for Futhark@@ -27,12 +27,12 @@     ghc-options:      -Wall     build-depends:         base >=4.3 && <5,-        futhark >=0.15,-        shake -any,-        text -any,-        filepath -any,+        futhark >=0.21.8,+        shake,+        text,+        filepath,         containers >=0.6,-        directory -any+        directory      if impl(ghc >=8.0)         ghc-options:
src/Development/Shake/Futhark.hs view
@@ -4,13 +4,12 @@                                  ) where  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, traced)-import           Language.Futhark.Parser   (parseFuthark)-import           Language.Futhark.Syntax   (DecBase (..), ModBindBase (ModBind), ModExpBase (..), ProgBase (Prog))+import           Language.Futhark.Parser   (SyntaxError (..), parseFuthark)+import           Language.Futhark.Syntax   (DecBase (..), ModBindBase (ModBind), ModExpBase (..), ProgBase (Prog), locStr) import           System.Directory          (canonicalizePath, makeRelativeToCurrentDirectory) import           System.FilePath           (takeDirectory, (<.>), (</>)) @@ -25,8 +24,9 @@ getFutDeps fp = traverse canonicalizeRelative =<< do     contents <- TIO.readFile fp     let dirFile = takeDirectory fp-        parsed = either (error.show) id $ parseFuthark fp contents+        parsed = either (error.showErr) id $ parseFuthark fp contents     pure ((dirFile </>) . (<.> "fut") <$> extractFromProgBase parsed)+    where showErr (SyntaxError l str) = locStr l ++ ": " ++ str  -- | Get all transitive dependencies getAllFutDeps :: FilePath -> IO [FilePath]