packages feed

shake-ats 1.0.0.0 → 1.0.0.1

raw patch · 2 files changed

+16/−11 lines, 2 filesdep ~shake-extPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: shake-ext

API changes (from Hackage documentation)

Files

shake-ats.cabal view
@@ -1,5 +1,5 @@ name:                shake-ats-version:             1.0.0.0+version:             1.0.0.1 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@@ -24,7 +24,7 @@   exposed-modules:     Development.Shake.ATS   build-depends:       base >= 4.7 && < 5                      , language-ats-                     , shake-ext >= 2.0.0.0+                     , shake-ext >= 2.1.0.0                      , hs2ats >= 0.2.0.1                      , directory                      , text
src/Development/Shake/ATS.hs view
@@ -39,8 +39,8 @@ import           System.Directory           (copyFile, createDirectoryIfMissing, doesDirectoryExist, listDirectory) import           System.Exit                (ExitCode (ExitSuccess)) -data ForeignCabal = ForeignCabal { cabalFile  :: TL.Text-                                 , objectFile :: TL.Text+data ForeignCabal = ForeignCabal { cabalFile  :: TL.Text -- ^ @.cabal@ file associated with the library+                                 , objectFile :: TL.Text -- ^ Object file to be generated                                  }  getSubdirs :: FilePath -> IO [FilePath]@@ -48,7 +48,10 @@     ds <- listDirectory p     case ds of         [] -> pure []-        xs -> filterM doesDirectoryExist (((p <> "/") <>) <$> xs)+        xs -> do+            ds' <- filterM doesDirectoryExist (((p <> "/") <>) <$> xs)+            ss <- mapM getSubdirs ds'+            pure $ ds' <> join ss  newtype Version = Version [Integer]     deriving (Eq, Generic, Binary)@@ -72,16 +75,18 @@      let cf = TL.unpack cf'         obf = TL.unpack obf'+        obfDir = takeDirectory (obf -<.> "hs")      trDeps <- liftIO $ getCabalDeps cf     obf %> \out -> do -        need (cf : trDeps)-        cmd_ ["cabal", "new-build"]+        need (cf : fmap ((obfDir <> "/") <>) trDeps)+        command_ [Cwd obfDir] "cabal" ["new-build"] -        let subdir = takeDirectory cf-        dir <- filter (== "build") <$> liftIO (getSubdirs $ subdir ++ "dist-newstyle/build")-        let obj = head dir ++ "/" ++ obf+        let subdir = takeDirectory cf ++ "/"+            endsBuild = (== "build") . last . splitPath+        dir <- filter endsBuild <$> liftIO (getSubdirs $ subdir ++ "dist-newstyle/build")+        let obj = head dir ++ "/" ++ (takeFileName obf)         liftIO $ copyFile obj out          let hdr = dropExtension obj ++ "_stub.h"@@ -138,7 +143,7 @@        -> Bool -- ^ Whether to use the garbage collector        -> [String] -- ^ A list of libraries against which to link        -> String -- ^ Source file-       -> [ForeignCabal] -- ^ Cabal-generated Haskell libraries+       -> [ForeignCabal] -- ^ Cabal-based Haskell libraries        -> [(String, String)] -- ^ Files to be run through @hs2ats@.        -> String -- ^ Binary target        -> Rules ()