ats-pkg 2.9.0.1 → 2.9.0.2
raw patch · 6 files changed
+20/−18 lines, 6 files
Files
- app/Main.hs +3/−2
- ats-pkg.cabal +1/−1
- dhall/atslib.dhall +4/−5
- src/Distribution/ATS/Build.hs +3/−3
- src/Language/ATS/Package/PackageSet.hs +1/−1
- src/Language/ATS/Package/Type.hs +8/−6
app/Main.hs view
@@ -4,6 +4,7 @@ ) where import Control.Composition+import Control.Monad import Data.Bool (bool) import Data.Maybe (fromMaybe) import Data.Semigroup (Semigroup (..))@@ -200,8 +201,8 @@ run :: Command -> IO () run List = displayList "https://raw.githubusercontent.com/vmchale/atspkg/master/ats-pkg/pkgs/pkg-set.dhall"-run (Check p b) = print . ($ Version [0,1,0]) =<< checkPkg p b-run (CheckSet p b) = print =<< checkPkgSet p b+run (Check p b) = void $ ($ Version [0,1,0]) <$> checkPkg p b+run (CheckSet p b) = void $ checkPkgSet p b run Upgrade = upgradeBin "vmchale" "atspkg" run Nuke = cleanAll run (Fetch u) = fetchPkg u
ats-pkg.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: ats-pkg-version: 2.9.0.1+version: 2.9.0.2 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale
dhall/atslib.dhall view
@@ -4,6 +4,10 @@ let concat = https://ipfs.io/ipfs/QmQ8w5PLcsNz56dMvRtq54vbuPe9cNnCCUXAQp6xLc6Ccx/Prelude/List/concat in +{- ATSPackage parts -}+let prelude = https://raw.githubusercontent.com/vmchale/atspkg/master/ats-pkg/dhall/atspkg-prelude.dhall+in+ {- Helper functions -} let mapDir = λ(rec : {dir : Text, xs : List Text }) →@@ -32,11 +36,6 @@ let mapML = λ(xs : List Text) → mapDir { dir = "libats/ML", xs = xs }-in--{- ATSPackage parts -}-let prelude = https://raw.githubusercontent.com/vmchale/atspkg/master/ats-pkg/dhall/atspkg-prelude.dhall- in let atslib =
src/Distribution/ATS/Build.hs view
@@ -10,7 +10,8 @@ import Language.ATS.Package.Build import Quaalude --- | Use this in place of 'defaultMain' for a simple build.+-- | Use this in place of 'defaultMain' for a simple build. It may be necessary+-- to use this in place of 'defaultMain' in any downstream packages as well. atsPolyglotBuild :: IO () atsPolyglotBuild = defaultMainWithHooks cabalHooks @@ -39,8 +40,7 @@ in lib { libBuildInfo = modifyBuildInfo libDir old } -- | This uses the users hooks as is @simpleUserHooks@, modified to build the--- ATS library. This should be called by any libraries depending on a package--- using @atsPolyglotBuild@.+-- ATS library. cabalHooks :: UserHooks cabalHooks = let defConf = confHook simpleUserHooks in simpleUserHooks { confHook = configureCabal .* defConf }
src/Language/ATS/Package/PackageSet.hs view
@@ -18,7 +18,7 @@ import Quaalude newtype ATSPackageSet = ATSPackageSet { _atsPkgSet :: [ ATSDependency ] }- deriving (Interpret, Show)+ deriving (Interpret) makeLenses ''ATSPackageSet
src/Language/ATS/Package/Type.hs view
@@ -46,6 +46,8 @@ -- | You likely want 'libDeps' or 'libBldDeps' type DepSelector = ATSDependency -> [LibDep] +data PkgConfig = PkgConfig { dir :: Text, target :: Maybe Text }+ -- TODO add a field for configure stage?? -- | Type for a dependency data ATSDependency = ATSDependency { libName :: Text -- ^ Library name, e.g.@@ -58,7 +60,7 @@ , libCDeps :: [LibDep] -- ^ C dependencies to be built , script :: [Text] -- ^ Optional build script for C library }- deriving (Eq, Show, Generic, Interpret, Binary, Hashable)+ deriving (Generic, Interpret, Binary, Hashable) makeLensesFor [("dir", "dirLens")] ''ATSDependency @@ -66,7 +68,7 @@ data TargetPair = TargetPair { hs :: Text , ats :: Text , cpphs :: Bool- } deriving (Eq, Show, Generic, Interpret, Binary, Hashable)+ } deriving (Generic, Interpret, Binary, Hashable) deriving instance Interpret ForeignCabal @@ -75,7 +77,7 @@ , atsGen :: [TargetPair] , extras :: [Text] }- deriving (Show, Eq, Generic, Interpret, Binary, Hashable)+ deriving (Generic, Interpret, Binary, Hashable) data Bin = Bin { src :: Text -- ^ Source file (should end with @.dats@) , target :: Text -- ^ Binary to be built@@ -85,7 +87,7 @@ , gcBin :: Bool -- ^ Whether to use the garbage collector , extras :: [Text] -- ^ Extra source files the build depends on }- deriving (Show, Eq, Generic, Interpret, Binary, Hashable)+ deriving (Generic, Interpret, Binary, Hashable) data Lib = Lib { name :: Text -- ^ Name of library being provided , src :: [Text] -- ^ Source files (should end with @.dats@) to be compiled to object files@@ -98,7 +100,7 @@ , extras :: [Text] -- ^ Other source files the build depends on , static :: Bool -- ^ Whether to make a static library }- deriving (Show, Eq, Generic, Interpret, Binary, Hashable)+ deriving (Generic, Interpret, Binary, Hashable) -- | Data type associated with @atspkg.dhall@ file. data Pkg = Pkg { bin :: [Bin] -- ^ List of binaries to be built@@ -116,4 +118,4 @@ , atsSource :: [Src] -- ^ ATS source to be compile to C. , dynLink :: Bool -- ^ Don't link statically, instead, use libraries installed by @atspkg@. }- deriving (Show, Eq, Generic, Interpret, Binary, Hashable)+ deriving (Generic, Interpret, Binary, Hashable)