ats-pkg 2.1.0.8 → 2.1.0.9
raw patch · 5 files changed
+20/−58 lines, 5 filesdep ~shake-atsPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: shake-ats
API changes (from Hackage documentation)
- Language.ATS.Package: [gc] :: Bin -> Bool
+ Language.ATS.Package: [gcBin] :: Bin -> Bool
Files
- README.md +0/−40
- ats-pkg.cabal +2/−2
- src/Language/ATS/Package/Build.hs +16/−14
- src/Language/ATS/Package/Type.hs +1/−1
- stack.yaml +1/−1
README.md view
@@ -71,46 +71,6 @@ You need only specify the source file and the target; `atspkg` will parse your ATS source files and track them (it will not track included C). -### Depending on a Library--Library specifications are also written in Dhall. Let's look at an example:--```dhall-let dep =- { libName = "atscntrb-concurrency-0.1.0"- , dir = ".atspkg/contrib"- , url = "https://github.com/vmchale/ats-concurrency/archive/0.1.0.tar.gz"- , libVersion = [0,1,0]- }--in dep-```--This defines a dependency by pointing to its tarball. Let's look at a simple-example:--```-let pkg = https://raw.githubusercontent.com/vmchale/atspkg/master/pkgs/default.dhall-in-let dbin = https://raw.githubusercontent.com/vmchale/atspkg/master/pkgs/default-bin.dhall--in pkg //- { bin =- [ dbin //- { src = "src/compat.dats"- , target = "target/poly"- }- ]- , dependencies = [ https://raw.githubusercontent.com/vmchale/ats-concurrency/master/atspkg.dhall ]- }-```--As Dhall is distributed, you can simply point to the package configuration URL-to add a dependency. You can find several preconfigured packages-[here](https://github.com/vmchale/atspkg/tree/master/pkgs), or you can write-your own configurations. You can even make package lists that are later filtered-if you so choose.- ### Building a Haskell Library You can see an example [here](https://github.com/vmchale/fast-arithmetic). You
ats-pkg.cabal view
@@ -1,5 +1,5 @@ name: ats-pkg-version: 2.1.0.8+version: 2.1.0.9 synopsis: Package manager for ATS description: A collection of scripts to make building ATS projects easy. homepage: https://github.com/vmchale/atspkg#readme@@ -51,7 +51,7 @@ , unix , lens , dhall- , shake-ats >= 1.1.0.0+ , shake-ats >= 1.2.0.0 , shake-ext >= 2.0.0.0 , composition-prelude >= 1.1.0.2 , optparse-applicative
src/Language/ATS/Package/Build.hs view
@@ -87,10 +87,10 @@ Just _ -> bool (pure ()) manpages b _ -> pure () +-- TODO allow it to be called in parent directory -- getParents :: FilePath -> IO [FilePath] -- getParents p = do --- findFile getConfig :: MonadIO m => Maybe FilePath -> m Pkg getConfig dir' = liftIO $ do d <- fromMaybe <$> fmap (<> "/atspkg.dhall") getCurrentDirectory <*> pure dir'@@ -176,7 +176,7 @@ -> Maybe String -- ^ Optional compiler triple (overrides 'ccompiler') -> Pkg -- ^ Package data type -> Rules ()-pkgToAction setup rs tgt ~(Pkg bs ts mt v v' ds cds cc cf as cdir) =+pkgToAction setup rs tgt ~(Pkg bs ts mt v v' ds cds ccLocal cf as cdir) = unless (rs == ["clean"]) $ do @@ -184,7 +184,7 @@ let gcV = Version [7,6,4] atomicV = Version [7,6,2]- cdps = if any gc bs then libcAtomicOps atomicV : libcGC gcV : cds else cds+ cdps = if any gcBin bs then libcAtomicOps atomicV : libcGC gcV : cds else cds liftIO $ fetchDeps False setup ds cdps False >> stopGlobalPool @@ -197,16 +197,18 @@ where g (Bin s t ls hs' atg gc') = atsBin- cc'- (TL.unpack <$> cf)- v- v'- gc'- (TL.unpack <$> ls)- (TL.unpack s)- hs'- (both TL.unpack . asTuple <$> atg)- (TL.unpack t)+ (BinaryTarget+ cc'+ (TL.unpack <$> cf)+ v+ v'+ gc'+ (TL.unpack <$> ls)+ (TL.unpack s)+ hs'+ (both TL.unpack . asTuple <$> atg)+ (TL.unpack t)+ ) cDeps = unless (null as) $ do let cedar = TL.unpack cdir@@ -215,4 +217,4 @@ want targets mapM_ (cgen v v') atsSourceDirs - cc' = maybe (TL.unpack cc) (<> "-gcc") tgt+ cc' = maybe (TL.unpack ccLocal) (<> "-gcc") tgt
src/Language/ATS/Package/Type.hs view
@@ -62,7 +62,7 @@ , libs :: [Text] -- ^ Libraries to link against (e.g. @[ "pthread" ]@) , hsDeps :: [ForeignCabal] -- ^ Haskell @.cabal@ files associated with the final library we want to make , hs2ats :: [TargetPair] -- ^ List of sources and targets for @hs2ats@- , gc :: Bool -- ^ Whether to use the garbage collector+ , gcBin :: Bool -- ^ Whether to use the garbage collector } deriving (Show, Eq, Generic, Interpret, Binary)
stack.yaml view
@@ -4,7 +4,7 @@ - '.' extra-deps: - shake-ext-2.1.0.2- - shake-ats-1.1.0.2+ - shake-ats-1.2.0.0 - composition-prelude-1.1.0.2 - language-ats-0.1.1.18 - cli-setup-0.2.0.1