ats-pkg 2.7.1.2 → 2.8.0.0
raw patch · 9 files changed
+49/−22 lines, 9 filesdep ~Cabaldep ~basedep ~dhallsetup-changed
Dependency ranges changed: Cabal, base, dhall
Files
- Setup.hs +1/−1
- app/Main.hs +15/−4
- ats-pkg.cabal +4/−4
- dhall/atslib.dhall +3/−3
- src/Distribution/ATS.hs +2/−2
- src/Language/ATS/Package.hs +2/−0
- src/Language/ATS/Package/Dhall.hs +20/−6
- src/Language/ATS/Package/Type.hs +1/−0
- src/Quaalude.hs +1/−2
Setup.hs view
@@ -16,7 +16,7 @@ maybeInstallActions :: ConfigFlags -> IO () maybeInstallActions cfs = bool nothing act cond where act = installActions- nothing = pure mempty+ nothing = mempty cond = (mkFlagName "no-executable", True) `notElem` unFlagAssignment (configConfigurationsFlags cfs) main :: IO ()
app/Main.hs view
@@ -51,6 +51,7 @@ , _lint :: Bool } | Check { _filePath :: String, _details :: Bool }+ | CheckSet { _filePath :: String, _details :: Bool } | List userCmd :: Parser Command@@ -64,7 +65,8 @@ <> command "upgrade" (info (pure Upgrade) (progDesc "Upgrade to the latest version of atspkg")) <> command "valgrind" (info valgrind (progDesc "Run generated binaries through valgrind")) <> command "run" (info run' (progDesc "Run generated binaries"))- <> command "check" (info check' (progDesc "Audit a package set to ensure it is well-typed."))+ <> command "check" (info check' (progDesc "Check that a pkg.dhall file is well-typed."))+ <> command "check-set" (info checkSet (progDesc "Audit a package set to ensure it is well-typed.")) <> command "list" (info (pure List) (progDesc "List available packages")) ) @@ -85,10 +87,18 @@ install = Install <$> triple +checkSet :: Parser Command+checkSet = CheckSet+ <$> targetP dhallCompletions id "check"+ <*> details+ check' :: Parser Command check' = Check- <$> targetP dhallCompletions id "check"- <*> switch+ <$> targetP dhallCompletions id "check-set"+ <*> details++details :: Parser Bool+details = switch (long "detailed" <> short 'd' <> help "Enable detailed error messages")@@ -190,7 +200,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 =<< checkPkg p b+run (Check p b) = print . ($ Version [0,1,0]) =<< checkPkg p b+run (CheckSet p b) = print =<< 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.7.1.2+version: 2.8.0.0 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -65,13 +65,13 @@ ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat build-depends:- base >=4.7 && <5,+ base >=4.11 && <5, http-client -any, bytestring -any, file-embed -any, shake -any, bzlib -any,- Cabal >=2.0.0.0,+ Cabal >=2.2.0.0, lzma -any, tar -any, zlib -any,@@ -86,7 +86,7 @@ microlens -any, microlens-th -any, mtl -any,- dhall >=1.10.0,+ dhall >=1.12.0, ansi-wl-pprint -any, shake-ats >=1.3.0.0, shake-ext >=2.6.0.0,
dhall/atslib.dhall view
@@ -37,10 +37,10 @@ {- ATSPackage parts -} let prelude = https://raw.githubusercontent.com/vmchale/atspkg/master/ats-pkg/dhall/atspkg-prelude.dhall -in prelude.default //+in prelude.default ⫽ { libraries = [- prelude.staticLib //+ prelude.staticLib ⫽ { libTarget = "target/lib/libatslib.a" , name = "atslib" , src =@@ -51,7 +51,7 @@ ] , includes = ([] : List Text) }- , prelude.staticLib //+ , prelude.staticLib ⫽ { libTarget = "target/lib/libatsopt.a" , name = "atsopt" , src = mapUtil [ "main", "print", "util" ]
src/Distribution/ATS.hs view
@@ -43,7 +43,7 @@ maybeCleanBuild li = let cf = configConfigurationsFlags (configFlags li) in - unless ((mkFlagName "development", True) `elem` cf) $+ unless ((mkFlagName "development", True) `elem` unFlagAssignment cf) $ putStrLn "Cleaning up ATS dependencies..." >> cleanATSCabal @@ -83,7 +83,7 @@ bool act nothing cond where act = (>> stopGlobalPool) . parallel_ . fmap fetchDependency nothing = pure mempty- cond = (mkFlagName "with-atsdeps", False) `elem` configConfigurationsFlags cfs+ cond = (mkFlagName "with-atsdeps", False) `elem` unFlagAssignment (configConfigurationsFlags cfs) fetchDependency :: ATSDependency -> IO () fetchDependency (ATSDependency libNameATS dirName url) = do
src/Language/ATS/Package.hs view
@@ -3,6 +3,8 @@ , mkPkg , cleanAll , buildHelper+ -- * Dhall verification helpers+ , checkPkgSet , checkPkg -- * Ecosystem functionality , displayList
src/Language/ATS/Package/Dhall.hs view
@@ -1,13 +1,27 @@-module Language.ATS.Package.Dhall ( checkPkg+module Language.ATS.Package.Dhall ( checkPkgSet+ , checkPkg ) where +import Data.Dependency import Language.ATS.Package.PackageSet+import Language.ATS.Package.Type import Quaalude -checkPkg :: FilePath -- ^ Path to @.dhall@ file defining a package set.- -> Bool -- ^ Whether to print detailed error messages.- -> IO ATSPackageSet-checkPkg path d = do+checkPkg :: FilePath+ -> Bool+ -> IO (Version -> ATSDependency)+checkPkg = checkDhall++checkDhall :: Interpret a+ => FilePath+ -> Bool+ -> IO a+checkDhall path d = do x <- input auto (pack ('.' : '/' : path)) let f = bool id detailed d- f (pure (x :: ATSPackageSet))+ f (pure x)++checkPkgSet :: FilePath -- ^ Path to @.dhall@ file defining a package set.+ -> Bool -- ^ Whether to print detailed error messages.+ -> IO ATSPackageSet+checkPkgSet = checkDhall
src/Language/ATS/Package/Type.hs view
@@ -37,6 +37,7 @@ } deriving (Eq, Show, Generic, Binary, Interpret, Hashable) +deriving newtype instance Inject Version deriving newtype instance Interpret Version deriving newtype instance Hashable Version
src/Quaalude.hs view
@@ -18,7 +18,6 @@ , isSuffixOf , on , both- , (<>) , (***) , (&&&) , (<=<)@@ -42,6 +41,7 @@ , thread -- * Dhall reëxports , Interpret+ , Inject , Generic , Binary , input@@ -122,7 +122,6 @@ import Data.Foldable import Data.List import Data.Maybe (fromMaybe)-import Data.Semigroup import Data.Text.Lazy (pack, unpack) import Data.Version (showVersion) import Development.Shake hiding (getEnv)