packages feed

shake-ats 1.9.0.3 → 1.9.0.5

raw patch · 4 files changed

+31/−4 lines, 4 filesdep ~shake-cabalPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: shake-cabal

API changes (from Hackage documentation)

Files

+ CHANGELOG.md view
@@ -0,0 +1,13 @@+# shake-ats++## 1.9.0.5++  * Bugfix for recent version of `shake-cabal`++## 1.9.0.4++  * Remove timestamp from generated `.c` files.++## 1.9.0.3++  * Use `getAppUserDirectory` for better portability
shake-ats.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: shake-ats-version: 1.9.0.3+version: 1.9.0.5 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -13,6 +13,7 @@ category: Development, Build, ATS, Shake build-type: Simple extra-doc-files: README.md+                 CHANGELOG.md  source-repository head     type: darcs
src/Development/Shake/ATS.hs view
@@ -36,6 +36,8 @@ import           Data.Foldable import           Data.Maybe                        (fromMaybe) import           Data.Semigroup                    (Semigroup (..))+import qualified Data.Text                         as T+import qualified Data.Text.IO                      as TIO import qualified Data.Text.Lazy                    as TL import           Development.Shake                 hiding (doesFileExist, getEnv) import           Development.Shake.ATS.Environment@@ -62,7 +64,15 @@                 Ignore -> ("--constraint-ignore":)                 _      -> id -    command env patsc (f ["--output", out, "-dd", sourceFile, "-cc"] ++ _patsFlags tc)+    (<*)+        (command env patsc (f ["--output", out, "-dd", sourceFile, "-cc"] ++ _patsFlags tc))+        (liftIO $ deleteLine out)++-- TODO: consider removing and caching that?+deleteLine :: FilePath -> IO ()+deleteLine fp = TIO.writeFile fp . del =<< TIO.readFile fp+    where del = T.unlines . fmap snd . filter p . zip [(1::Int)..] . T.lines+          p = (4 /=) . fst  -- | Filter any generated errors with @pats-filter@. withPF :: Action (Exit, Stderr String, Stdout String) -- ^ Result of a 'cmd' or 'command'
src/Development/Shake/ATS/Rules.hs view
@@ -6,8 +6,10 @@                                    , genLinks                                    ) where +import           Control.Arrow                  (second) import           Control.Monad import           Data.Foldable+import           Data.List                      (isSuffixOf) import           Data.Semigroup                 (Semigroup (..)) import qualified Data.Text.Lazy                 as TL import           Development.Shake              hiding (doesDirectoryExist)@@ -61,7 +63,8 @@         libName = takeBaseName cf      obf %> \out -> do-        (v, trDeps) <- liftIO $ getCabalDeps cf+        let isHaskell path = not (".cabal" `isSuffixOf` path)+        (v, trDeps) <- liftIO $ second (filter isHaskell) <$> getCabalDeps cf          ghcV' <- quietly ghcVersion         let ghcV = maybe ghcV' (drop 1) suff@@ -80,7 +83,7 @@          let hdr = dropExtension obj ++ "_stub.h"         liftIO $ copyFile hdr (takeDirectory out </> takeFileName hdr)-cabalForeign _ _ = mempty -- FXIME error here?+cabalForeign _ _ = error "CCompiler must be GHC"  -- | Build a @.lats@ file using @atslex@. atsLex :: FilePath -- ^ Filepath of @.lats@ file