ats-pkg 3.5.0.0 → 3.5.0.1
raw patch · 11 files changed
+155/−122 lines, 11 filesdep +archive-libarchivedep +archive-sigdep −libarchivedep ~composition-prelude
Dependencies added: archive-libarchive, archive-sig
Dependencies removed: libarchive
Dependency ranges changed: composition-prelude
Files
- CHANGELOG.md +4/−0
- LICENSE +1/−1
- ats-pkg.cabal +7/−4
- dhall/atspkg-prelude.dhall +128/−99
- dhall/config.dhall +4/−3
- internal/Quaalude.cpphs +1/−0
- man/atspkg.1 +2/−2
- src/Language/ATS/Package/Build.hs +3/−6
- src/Language/ATS/Package/Compiler.hs +2/−3
- src/Language/ATS/Package/Dependency.hs +2/−3
- src/Language/ATS/Package/PackageSet.hs +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # ats-pkg +## 3.5.0.1++ * Bump config files+ ## 3.5.0.0 * Remove `packageCompiler`
LICENSE view
@@ -1,4 +1,4 @@-Copyright Vanessa McHale (c) 2017-2019+Copyright Vanessa McHale (c) 2017-2020 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
ats-pkg.cabal view
@@ -1,9 +1,9 @@ cabal-version: 2.0 name: ats-pkg-version: 3.5.0.0+version: 3.5.0.1 license: BSD3 license-file: LICENSE-copyright: Copyright: (c) 2018-2019 Vanessa McHale+copyright: Copyright: (c) 2018-2020 Vanessa McHale maintainer: vamchale@gmail.com author: Vanessa McHale tested-with: ghc ==8.4.4 ghc ==8.6.5 ghc ==8.8.2@@ -88,9 +88,12 @@ ansi-wl-pprint -any, dependency >=1.2.0.0, quaalude -any,- libarchive >=2.2.1.0,+ archive-sig >=1.0.1.0,+ archive-libarchive >=1.0.0.0, unix-compat -any + mixins: archive-libarchive (Archive.FFI as Archive)+ if flag(development) ghc-options: -Werror @@ -110,7 +113,7 @@ ansi-wl-pprint -any, shake >=0.18.4, bytestring -any,- composition-prelude >=1.3.0.3,+ composition-prelude >=3.0.0.0, binary -any, text -any, mtl -any,
dhall/atspkg-prelude.dhall view
@@ -17,7 +17,7 @@ let TargetPair = { hs : Text, ats : Text, cpphs : Bool } -let CCompiler = < CompCert | Clang | GCC | ICC | CC >+let CCompiler = < CompCert | Clang | GCC | ICC | Pgi | CC > let Bin = { src : Text@@ -51,6 +51,8 @@ let Script = { configure : Optional Text, build : Text, install : Text } +let Solver = < PatsSolve | Z3 | Ignore >+ let Debian = { package : Text , version : List Natural@@ -65,27 +67,47 @@ , changelog : Optional Text } -let script =- λ(x : { dir : Text, target : Optional Text })- → { configure = Some "./configure --prefix=${x.dir}"+let AtsPkg =+ { bin : List Bin+ , test : List Bin+ , bench : List Bin+ , libraries : List Lib+ , man : Optional Text+ , completions : Optional Text+ , version : List Natural+ , compiler : List Natural+ , dependencies : List LibDep+ , clib : List LibDep+ , buildDeps : List LibDep+ , ccompiler : Text+ , cflags : List Text+ , atsFlags : List Text+ , atsSource : List Src+ , dynLink : Bool+ , extSolve : Solver+ , debPkg : Optional Debian+ , atsLib : Bool+ }++let autoconfScript =+ λ(x : { dir : Text, target : Optional Text }) →+ { configure = Some "./configure --prefix=${x.dir}" , build = "make -j6" , install = "make install" } : Script let src =- λ(x : { atsSrc : Text, cTarget : Text })- → { atsSrc = x.atsSrc+ λ(x : { atsSrc : Text, cTarget : Text }) →+ { atsSrc = x.atsSrc , cTarget = x.cTarget , atsGen = [] : List TargetPair , extras = [] : List Text } -let iccFlags = [ "-D__PURE_INTEL_C99_HEADERS__" ]- let mapSrc =- λ(x : List { atsSrc : Text, cTarget : Text })- → map { atsSrc : Text, cTarget : Text } Src src x+ λ(x : List { atsSrc : Text, cTarget : Text }) →+ map { atsSrc : Text, cTarget : Text } Src src x let patsHome = ".atspkg/contrib" @@ -96,16 +118,16 @@ let plainDeps = λ(x : Text) → { _1 = x, _2 = { lower = none, upper = none } } let eqDeps =- λ(x : { name : Text, version : List Natural })- → { _1 = x.name, _2 = { lower = Some x.version, upper = Some x.version } }+ λ(x : { name : Text, version : List Natural }) →+ { _1 = x.name, _2 = { lower = Some x.version, upper = Some x.version } } let lowerDeps =- λ(x : { name : Text, version : List Natural })- → { _1 = x.name, _2 = { lower = Some x.version, upper = none } }+ λ(x : { name : Text, version : List Natural }) →+ { _1 = x.name, _2 = { lower = Some x.version, upper = none } } let upperDeps =- λ(x : { name : Text, version : List Natural })- → { _1 = x.name, _2 = { lower = none, upper = Some x.version } }+ λ(x : { name : Text, version : List Natural }) →+ { _1 = x.name, _2 = { lower = none, upper = Some x.version } } let mapPlainDeps = λ(x : List Text) → map Text LibDep plainDeps x @@ -137,37 +159,36 @@ let staticLib = lib ⫽ { static = True } -let Solver = < PatsSolve | Z3 | Ignore >- let solver = Solver.PatsSolve let ignore = Solver.Ignore let default =- { bin = [] : List Bin- , test = [] : List Bin- , bench = [] : List Bin- , libraries = [] : List Lib- , man = None Text- , completions = None Text- , version = [ 0, 3, 13 ]- , compiler = [ 0, 3, 13 ]- , dependencies = [] : List LibDep- , clib = [] : List LibDep- , buildDeps = [] : List LibDep- , ccompiler = "gcc"- , cflags = [ "-O2" ]- , atsFlags = [] : List Text- , atsSource = [] : List Src- , dynLink = True- , extSolve = solver- , debPkg = None Debian- , atsLib = True- }+ { bin = [] : List Bin+ , test = [] : List Bin+ , bench = [] : List Bin+ , libraries = [] : List Lib+ , man = None Text+ , completions = None Text+ , version = [ 0, 3, 13 ]+ , compiler = [ 0, 3, 13 ]+ , dependencies = [] : List LibDep+ , clib = [] : List LibDep+ , buildDeps = [] : List LibDep+ , ccompiler = "gcc"+ , cflags = [ "-O2" ]+ , atsFlags = [] : List Text+ , atsSource = [] : List Src+ , dynLink = True+ , extSolve = solver+ , debPkg = None Debian+ , atsLib = True+ }+ : AtsPkg let debian =- λ(project : Text)- → { package = project+ λ(project : Text) →+ { package = project , target = "target/${project}.deb" , manpage = None Text , binaries = [] : List Text@@ -178,8 +199,8 @@ } let makePkg =- λ(rec : { x : List Natural, name : Text, githubUsername : Text })- → dep+ λ(rec : { x : List Natural, name : Text, githubUsername : Text }) →+ dep ⫽ { libName = rec.name , dir = "${patsHome}" , url =@@ -189,8 +210,8 @@ } let makeNpmPkg =- λ(rec : { x : List Natural, name : Text, unpackDir : Text })- → dep+ λ(rec : { x : List Natural, name : Text, unpackDir : Text }) →+ dep ⫽ { libName = rec.name , dir = "${patsHome}/${rec.unpackDir}" , url =@@ -200,8 +221,8 @@ } let makeHsPkg =- λ(rec : { x : List Natural, name : Text })- → dep+ λ(rec : { x : List Natural, name : Text }) →+ dep ⫽ { libName = rec.name , dir = "${patsHome}" , url =@@ -212,14 +233,14 @@ } let makePkgDescr =- λ ( x- : { x : List Natural- , name : Text- , githubUsername : Text- , description : Text- }- )- → makePkg { x = x.x, name = x.name, githubUsername = x.githubUsername }+ λ ( x+ : { x : List Natural+ , name : Text+ , githubUsername : Text+ , description : Text+ }+ ) →+ makePkg { x = x.x, name = x.name, githubUsername = x.githubUsername } ⫽ { description = Some x.description } let cabalDir = "dist-newstyle/lib"@@ -248,71 +269,79 @@ let icc = CCompiler.ICC +let pgi = CCompiler.Pgi+ let cc = CCompiler.CC let printCompiler =- λ(cc : CCompiler)- → merge+ λ(cc : CCompiler) →+ merge { CompCert = "ccomp" , Clang = "clang" , GCC = "gcc" , ICC = "icc"+ , Pgi = "pgcc" , CC = "cc" } cc let ccFlags =- λ(cc : CCompiler)- → merge+ λ(cc : CCompiler) →+ merge { CompCert = [ "-O2", "-fstruct-passing" ] , Clang = [ "-O2", "-mtune=native", "-flto" ] , GCC = [ "-O2", "-mtune=native", "-flto" ] , ICC =- [ "-O2"- , "-mtune=native"- , "-flto"- , "-D__PURE_INTEL_C99_HEADERS__"- ]+ [ "-O2", "-mtune=native", "-flto", "-D__PURE_INTEL_C99_HEADERS__" ] , CC = [ "-O2" ]+ , Pgi = [ "-O2", "-mtune=native" ] } cc let iccFlags = [ "-D__PURE_INTEL_C99_HEADERS__" ] -in { mkDeb = mkDeb- , emptySrc = emptySrc- , emptyBin = emptyBin- , emptyLib = emptyLib- , showVersion = showVersion- , makePkg = makePkg- , bin = bin- , lib = lib- , dep = dep- , staticLib = staticLib- , default = default- , plainDeps = plainDeps- , lowerDeps = lowerDeps- , upperDeps = upperDeps- , eqDeps = eqDeps- , mapPlainDeps = mapPlainDeps- , src = src- , mapSrc = mapSrc- , makePkgDescr = makePkgDescr- , makeHsPkg = makeHsPkg- , makeNpmPkg = makeNpmPkg- , patsHome = patsHome- , cabalDir = cabalDir- , solver = solver- , ignore = ignore- , debian = debian- , noPrelude = noPrelude- , atsProject = atsProject- , gcc = gcc- , clang = clang- , compCert = compCert- , icc = icc- , cc = cc- , printCompiler = printCompiler- , ccFlags = ccFlags- , iccFlags = iccFlags+let compilerMod =+ λ(cc : CCompiler) →+ λ(x : AtsPkg) →+ x ⫽ { ccompiler = printCompiler cc, cflags = x.cflags # ccFlags cc }++in { mkDeb+ , emptySrc+ , emptyBin+ , emptyLib+ , showVersion+ , makePkg+ , bin+ , lib+ , dep+ , staticLib+ , default+ , plainDeps+ , lowerDeps+ , upperDeps+ , eqDeps+ , mapPlainDeps+ , src+ , mapSrc+ , makePkgDescr+ , makeHsPkg+ , makeNpmPkg+ , patsHome+ , cabalDir+ , solver+ , ignore+ , debian+ , noPrelude+ , atsProject+ , gcc+ , clang+ , compCert+ , icc+ , pgi+ , cc+ , printCompiler+ , ccFlags+ , iccFlags+ , autoconfScript+ , compilerMod }
dhall/config.dhall view
@@ -1,9 +1,10 @@-let commit = "c0ab1d0f37385b8bb762a3d73d9e44388601eefe"+let commit = "96d6d6d5e29c4d8bafdc46725095e38a7c77d686" -let hash = ""+let hash =+ "sha256:a16dc6b6d4d803a90682ec4e105a568a3c57bea8369fab6befccb9e6d203c615" in { defaultPkgs =- "https://raw.githubusercontent.com/vmchale/atspkg/${commit}/ats-pkg/pkgs/pkg-set.dhall sha256:a16dc6b6d4d803a90682ec4e105a568a3c57bea8369fab6befccb9e6d203c615"+ "https://raw.githubusercontent.com/vmchale/atspkg/${commit}/ats-pkg/pkgs/pkg-set.dhall ${hash}" , path = None Text , githubUsername = "" , filterErrors = False
internal/Quaalude.cpphs view
@@ -49,6 +49,7 @@ , (.**) , thread , bisequence'+ , (&:) -- * Dhall reëxports , FromDhall , ToDhall
man/atspkg.1 view
@@ -1,4 +1,4 @@-.\" Automatically generated by Pandoc 2.9.1.1+.\" Automatically generated by Pandoc 2.10.1 .\" .TH "atspkg (1)" "" "" "" "" .hy@@ -113,7 +113,7 @@ https://github.com/vmchale/atspkg/issues. .SH COPYRIGHT .PP-Copyright 2018-2019.+Copyright 2018-2020. Vanessa McHale. All Rights Reserved. .SH AUTHORS
src/Language/ATS/Package/Build.hs view
@@ -34,7 +34,8 @@ check :: Maybe String -> Maybe FilePath -> IO Bool check mStr p = do v <- wants mStr p- doesFileExist =<< getAppUserDataDirectory ("atspkg" </> show v </> "bin" </> "patscc")+ let vs = show v+ doesFileExist =<< getAppUserDataDirectory ("atspkg" </> vs </> "ATS2-Postiats-gmp-" ++ vs </> "bin" </> "patscc") wants :: Maybe String -> Maybe FilePath -> IO Version wants mStr p = compiler <$> getConfig mStr p@@ -142,12 +143,8 @@ getConfig :: MonadIO m => Maybe String -> Maybe FilePath -> m Pkg getConfig mStr dir' = liftIO $ do d <- fromMaybe <$> fmap (</> dhallFile) getCurrentDirectory <*> pure dir'- b <- not <$> doesFileExist cfgFile let go = case mStr of { Just x -> (<> (" " <> parens x)) ; Nothing -> id }- b' <- shouldWrite mStr cfgArgs- if b || b'- then input auto (T.pack (go d))- else fmap (decode . BSL.fromStrict) . BS.readFile $ cfgFile+ input auto (T.pack (go d)) manTarget :: Text -> FilePath manTarget m = unpack m -<.> "1"
src/Language/ATS/Package/Compiler.hs view
@@ -12,9 +12,8 @@ , SetupScript ) where -import qualified Codec.Archive as Archive+import qualified Archive.Compression as Archive import Codec.Compression.GZip (decompress)-import Control.Exception (throw) import Control.Monad import Data.Dependency import Data.FileEmbed@@ -66,7 +65,7 @@ response <- responseBody <$> httpLbs (initialRequest { method = "GET" }) manager withCompiler "Unpacking" v- fmap (either throw id) $ Archive.runArchiveM $ Archive.unpackToDirLazy cd (decompress response)+ Archive.unpackToDir cd (decompress response) make :: Verbosity -> Version -> FilePath -> IO () make v' v cd =
src/Language/ATS/Package/Dependency.hs view
@@ -7,12 +7,11 @@ , SetupScript ) where -import Codec.Archive as Archive+import qualified Archive.Compression as Archive import Codec.Archive.Zip (ZipOption (..), extractFilesFromArchive, toArchive) import qualified Codec.Compression.GZip as Gzip import qualified Codec.Compression.Lzma as Lzma import Control.Concurrent.ParallelIO.Global-import Control.Exception (throw) import qualified Data.ByteString.Lazy as BSL import qualified Data.Text.Lazy as TL import Development.Shake.ATS@@ -106,7 +105,7 @@ tarResponse :: Text -> FilePath -> ByteString -> IO () tarResponse url' dirName response = do compress <- getCompressor url'- let f = fmap (either throw id) . runArchiveM . Archive.unpackToDirLazy dirName . compress+ let f = Archive.unpackToDir dirName . compress -- let f = Tar.unpack dirName . Tar.read . compress f response
src/Language/ATS/Package/PackageSet.hs view
@@ -47,7 +47,7 @@ -> IO ATSPackageSet listDeps b = fmap s . input auto . T.pack where s = bool id s' b- s' = over atsPkgSet (sortBy (compare `on` libName))+ s' = over atsPkgSet (sortBy (compare &: libName)) setBuildPlan :: FilePath -- ^ Filepath for cache inside @.atspkg@ -> DepSelector