packages feed

ats-setup 0.2.0.0 → 0.2.0.1

raw patch · 2 files changed

+6/−14 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Distribution.ATS: atsFull :: ATSVersion -> ATSDependency
- Distribution.ATS: findCli :: ATSDependency

Files

ats-setup.cabal view
@@ -1,5 +1,5 @@ name:                ats-setup-version:             0.2.0.0+version:             0.2.0.1 synopsis:            ATS scripts for Cabal builds description:         This package contains various scripts that go in a package's @Setup.hs@ to make building libraries with ATS dependencies easier. license:             BSD3
src/Distribution/ATS.hs view
@@ -11,14 +11,13 @@                         , intinf                         , atsPrelude                         , atsContrib-                        , atsFull-                        , findCli                         ) where  import qualified Codec.Archive.Tar                    as Tar import           Codec.Compression.GZip               (decompress) import           Control.Concurrent.ParallelIO.Global import           Control.Monad+import           Data.Bool import           Data.List                            (intercalate) import           Distribution.PackageDescription import           Distribution.Simple@@ -54,7 +53,9 @@  -- TODO custom directory? cleanATSCabal :: IO ()-cleanATSCabal = removeDirectoryRecursive "ats-deps"+cleanATSCabal = do+    b <- doesDirectoryExist "ats-deps"+    bool (pure ()) (removeDirectoryRecursive "ats-deps") b  vString :: ATSVersion -> String vString = intercalate "." . fmap show@@ -63,10 +64,6 @@ atsContrib v = ATSDependency ("ats2-postiats-" ++ vs ++ "-contrib") "ats-deps/contrib" ("https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-" ++ vs ++ "/ATS2-Postiats-contrib-" ++ vs ++ ".tgz")     where vs = vString v --- | Directory traversal library for ATS-findCli :: ATSDependency-findCli = ATSDependency"atscntrb-hx-find-cli-1.0.0" "ats-deps/contrib/atscntrb-hx-find-cli" "https://registry.npmjs.org/atscntrb-hx-find-cli/-/atscntrb-hx-find-cli-1.0.0.tgz"- -- | GMP bindings for ATS libgmp :: ATSDependency libgmp = ATSDependency "atscntrb-libgmp-1.0.4" "ats-deps/contrib/atscntrb-libgmp" "https://registry.npmjs.org/atscntrb-libgmp/-/atscntrb-libgmp-1.0.4.tgz"@@ -75,11 +72,6 @@ intinf :: ATSDependency intinf = ATSDependency "atscntrb-hs-intinf-1.0.6" "ats-deps/contrib/atscntrb-hx-intinf" "https://registry.npmjs.org/atscntrb-hx-intinf/-/atscntrb-hx-intinf-1.0.6.tgz" --- | Full ATS libraries.-atsFull :: ATSVersion -> ATSDependency-atsFull v = ATSDependency ("ats2-postiats-" ++ vs) "ats-deps" ("https://github.com/vmchale/atspkg/raw/master/pkgs/ATS2-Postiats-" ++ vs ++ ".tar.gz")-    where vs = vString v- -- | ATS prelude atsPrelude :: ATSVersion -> ATSDependency atsPrelude v = ATSDependency ("ats2-postiats-" ++ vs ++ "-prelude") "ats-deps/prelude" ("https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-" ++ vs ++ "/ATS2-Postiats-include-" ++ vs ++ ".tgz")@@ -91,7 +83,7 @@ fetchDependency :: ATSDependency -> IO () fetchDependency (ATSDependency libNameATS dirName url) = do -    needsSetup <- not <$> doesDirectoryExist (dirName ++ "/unpacked")+    needsSetup <- not <$> doesFileExist (dirName ++ "/unpacked")      when needsSetup $ do