ats-pkg 2.0.0.11 → 2.0.0.12
raw patch · 6 files changed
+22/−12 lines, 6 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Language.ATS.Package: TargetPair :: Text -> Text -> TargetPair
+ Language.ATS.Package: [ats] :: TargetPair -> Text
+ Language.ATS.Package: [hs] :: TargetPair -> Text
+ Language.ATS.Package: data TargetPair
Files
- README.md +1/−1
- ats-pkg.cabal +2/−2
- src/Language/ATS/Package.hs +1/−0
- src/Language/ATS/Package/Build.hs +13/−7
- src/Language/ATS/Package/Dependency.hs +3/−2
- src/Language/ATS/Package/Type.hs +2/−0
README.md view
@@ -18,7 +18,7 @@ [GHC](https://www.haskell.org/ghc/download.html) and install with ```bash-cabal new-install ats-pkg --symlink-bindir ~/.local/bin --happy-options='-gcsa' --alex-options='-g'+cabal new-install ats-pkg ~/.local/bin --happy-options='-gcsa' --alex-options='-g' ``` Note that `$HOME/.local/bin` will need to be on your `PATH`.
ats-pkg.cabal view
@@ -1,8 +1,8 @@ name: ats-pkg-version: 2.0.0.11+version: 2.0.0.12 synopsis: Package manager for ATS description: A collection of scripts to make building ATS projects easy.-homepage: https://github.com/vmchale/ats-pkg#readme+homepage: https://github.com/vmchale/atspkg#readme license: BSD3 license-file: LICENSE author: Vanessa McHale
src/Language/ATS/Package.hs view
@@ -10,6 +10,7 @@ , Bin (..) , Constraint (..) , Dependency (..)+ , TargetPair (..) -- * Lenses , dirLens ) where
src/Language/ATS/Package/Build.hs view
@@ -146,6 +146,14 @@ (Just m) -> want . bool bins (manTarget m : bins) =<< pandoc Nothing -> want bins +bits :: Rules ()+bits = foldr (>>) (pure ())+ [ mkTest+ , mkManpage+ , mkInstall+ , mkConfig+ ]+ pkgToAction :: [IO ()] -> [String] -> Pkg -> Rules () pkgToAction setup rs ~(Pkg bs ts mt v v' ds cds cc cf as cdir) = @@ -153,20 +161,18 @@ want [".atspkg/config"] - let cdps = if any gc bs then libcAtomicOps : libcGC (Version [7,6,4]) : cds else cds+ let gcV = Version [7,6,4]+ atomicV = Version [7,6,2]+ cdps = if any gc bs then libcAtomicOps atomicV : libcGC gcV : cds else cds+ liftIO $ fetchDeps False setup ds cdps False >> stopGlobalPool let bins = TL.unpack . target <$> bs setTargets rs bins mt - cDeps+ cDeps >> bits mapM_ g (bs ++ ts)-- mkTest- mkManpage- mkInstall- mkConfig where g (Bin s t ls hs' atg gc') = atsBin
src/Language/ATS/Package/Dependency.hs view
@@ -28,8 +28,9 @@ import System.Posix.Files import System.Process -libcAtomicOps :: Dependency-libcAtomicOps = Dependency "atomic-ops" "atomic-ops-7.6.2" "https://github.com/ivmai/libatomic_ops/releases/download/v7.6.2/libatomic_ops-7.6.2.tar.gz" (Version [7,6,2])+libcAtomicOps :: Version -> Dependency+libcAtomicOps v = Dependency "atomic-ops" ("atomic-ops-" <> g v) ("https://github.com/ivmai/libatomic_ops/releases/download/v" <> g v <> "/libatomic_ops-" <> g v <> ".tar.gz") v+ where g = TL.pack . show libcGC :: Version -> Dependency libcGC v = Dependency "gc" ("gc-" <> g v) ("https://github.com/ivmai/bdwgc/releases/download/v" <> g v <> "/gc-" <> g v <> ".tar.gz") v
src/Language/ATS/Package/Type.hs view
@@ -46,6 +46,7 @@ makeLensesFor [("dir", "dirLens")] ''Dependency +-- | This is just a tuple, except I can figure out how to use it with Dhall. data TargetPair = TargetPair { hs :: Text , ats :: Text } deriving (Eq, Show, Generic, Interpret, Binary)@@ -59,6 +60,7 @@ } deriving (Show, Eq, Generic, Interpret, Binary) +-- | Data type associated with @atspkg.dhall@ file. data Pkg = Pkg { bin :: [Bin] -- ^ List of binaries to be built , test :: [Bin] -- ^ List of test suites , man :: Maybe Text -- ^ Optional (markdown) manpages to be converted using @pandoc@.