ats-pkg 3.2.4.0 → 3.2.4.2
raw patch · 7 files changed
+254/−267 lines, 7 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- ats-pkg.cabal +2/−1
- dhall/atslib.dhall +2/−2
- dhall/atspkg-prelude.dhall +2/−2
- internal/Quaalude.cpphs +208/−0
- internal/Quaalude.hs +0/−209
- man/atspkg.1 +36/−53
CHANGELOG.md view
@@ -1,5 +1,9 @@ # ats-pkg +## 3.2.4.2++ * Update `.dhall` files+ ## 3.2.4.0 * Update to use `cpphs` again
ats-pkg.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: ats-pkg-version: 3.2.4.0+version: 3.2.4.2 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -49,6 +49,7 @@ exposed-modules: Language.ATS.Package Distribution.ATS+ build-tools: cpphs -any hs-source-dirs: src other-modules: Paths_ats_pkg
dhall/atslib.dhall view
@@ -1,7 +1,7 @@ {- Dhall prelude imports -}-let map = https://raw.githubusercontent.com/dhall-lang/Prelude/master/List/map+let map = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/List/map in-let concat = https://raw.githubusercontent.com/dhall-lang/Prelude/master/List/concat+let concat = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/List/concat in {- ATSPackage parts -}
dhall/atspkg-prelude.dhall view
@@ -1,7 +1,7 @@ {- Dhall prelude functions -}-let concatMapSep = https://raw.githubusercontent.com/dhall-lang/Prelude/master/Text/concatMapSep+let concatMapSep = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/Text/concatMapSep in-let map = https://raw.githubusercontent.com/dhall-lang/Prelude/master/List/map+let map = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/List/map in {- Types for export and supporting functions -}
+ internal/Quaalude.cpphs view
@@ -0,0 +1,208 @@+{-# LANGUAGE FlexibleContexts #-}++module Quaalude ( hex+ , bool+ , intersperse+ , transpose+ , sortBy+ , void+ , unless+ , when+ , join+ , fold+ , zipWithM_+ , zipWithM+ , filterM+ , encode+ , decode+ , fromMaybe+ , isNothing+ , isPrefixOf+ , isSuffixOf+ , on+ , both+ , (***)+ , (&&&)+ , (<=<)+ , ($>)+ , first+ , second+ , getEnv+ , exitWith+ , showVersion+ , traverse_+ , nubSpecial+ , (<>)+ , ExitCode (ExitSuccess)+ , MonadIO (..)+ -- * Miscellaneous+ , makeExe+ , shouldWrite+ -- * "System.Process.Ext" reëxports+ , silentCreateProcess+ -- * "Data.Text.Lazy" reëxports+ , Text+ , pack+ , unpack+ -- * "Control.Composition" reëxports+ , biaxe+ , (.*)+ , (.**)+ , thread+ , bisequence'+ -- * Dhall reëxports+ , Interpret+ , Inject+ , Generic+ , Binary+ , input+ , auto+ , detailed+ -- * Shake reëxports+ , Rules+ , Action+ , command+ , command_+ , (%>)+ , need+ , want+ , shake+ , Rebuild (..)+ , (~>)+ , cmd+ , cmd_+ , ShakeOptions (..)+ , shakeOptions+ , copyFile'+ , Change (..)+ , Verbosity (..)+ , removeFilesAfter+ , Lint (..)+ , takeBaseName+ , takeFileName+ , takeDirectory+ , (-<.>)+ , makeExecutable+ -- * "Network.HTTP.Client.TLS" reëxports+ , tlsManagerSettings+ -- "Network.HTTP.Client" reëxports+ , newManager+ , parseRequest+ , httpLbs+ , Response (..)+ , Request (method, redirectCount)+ -- * "System.FilePath" reëxports+ , (</>)+ , pathSeparator+ -- * ByteString reëxports+ , ByteString+ -- * Helpers for pretty-printing+ , (<#>)+ -- * "Text.PrettyPrint.ANSI.Leijen" reëxports+ , (<+>)+ , text+ , punctuate+ , dullred+ , linebreak+ , dullyellow+ , hardline+ , hang+ , indent+ , putDoc+ , Pretty (pretty)+ , module X+ -- Lens exports+ , Lens'+ , over+ , _Just+ , view+ , _1+ , _2+ , _4+ , each+ , (&)+ , (%~)+#ifdef DEBUG+ , traceShowId+ , traceShow+#endif+ ) where++import Control.Arrow hiding ((<+>))+import Control.Composition+import Control.Monad+import Control.Monad.IO.Class+import Control.Monad.State.Lazy+import Data.Binary+import Data.Bool (bool)+import Data.ByteString.Lazy (ByteString)+import qualified Data.ByteString.Lazy as BSL+import Data.Containers.ListUtils (nubOrd)+import Data.Foldable (fold, traverse_)+import Data.Functor (($>))+#if !MIN_VERSION_base(4,11,0)+import Data.Semigroup+#endif+import Data.List+import Data.Maybe (fromMaybe, isNothing)+import Data.Text.Lazy (Text, pack, unpack)+import Data.Version (showVersion)+#ifdef DEBUG+import Debug.Trace (traceShow, traceShowId)+#endif+import Development.Shake hiding (doesFileExist, getEnv)+import Development.Shake.FilePath+import Dhall hiding (Text, bool)+import Lens.Micro hiding (both)+import Lens.Micro.Extras+import Network.HTTP.Client+import Network.HTTP.Client.TLS (tlsManagerSettings)+import Numeric (showHex)+import System.Directory as X+import System.Environment (getEnv)+import System.Exit (ExitCode (ExitSuccess), exitWith)+import System.Info (os)+#ifndef mingw32_HOST_OS+import System.Posix.Files+#endif+import System.Process as X+import System.Process.Ext+import Text.PrettyPrint.ANSI.Leijen hiding (bool, group, (<$>), (</>), (<>))++infixr 5 <#>++#ifdef mingw32_HOST_OS+makeExecutable :: FilePath -> IO ()+makeExecutable = pure mempty+#else+makeExecutable :: FilePath -> IO ()+makeExecutable = flip setFileMode ownerModes+#endif++nubSpecial :: (Ord a) => [[a]] -> [[a]]+nubSpecial = fmap pure . nubOrd . join++makeExe :: String+makeExe = case os of+ "freebsd" -> "gmake"+ "openbsd" -> "gmake"+ "netbsd" -> "gmake"+ "solaris" -> "gmake"+ "dragonfly" -> "gmake"+ _ -> "make"++hex :: Int -> String+hex = flip showHex mempty++-- | Same as "Text.PrettyPrint.ANSI.Leijen"'s @<$>@, but doesn't clash with the+-- prelude.+(<#>) :: Doc -> Doc -> Doc+(<#>) a b = a <> line <> b++shouldWrite :: (MonadIO m, Binary a) => a -> FilePath -> m Bool+shouldWrite x fp = do+ exists <- liftIO (doesFileExist fp)+ contents <- if exists+ then liftIO (BSL.readFile fp)+ else pure mempty+ pure $ BSL.length contents /= 0 && encode x /= contents
− internal/Quaalude.hs
@@ -1,209 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE FlexibleContexts #-}--module Quaalude ( hex- , bool- , intersperse- , transpose- , sortBy- , void- , unless- , when- , join- , fold- , zipWithM_- , zipWithM- , filterM- , encode- , decode- , fromMaybe- , isNothing- , isPrefixOf- , isSuffixOf- , on- , both- , (***)- , (&&&)- , (<=<)- , ($>)- , first- , second- , getEnv- , exitWith- , showVersion- , traverse_- , nubSpecial- , (<>)- , ExitCode (ExitSuccess)- , MonadIO (..)- -- * Miscellaneous- , makeExe- , shouldWrite- -- * "System.Process.Ext" reëxports- , silentCreateProcess- -- * "Data.Text.Lazy" reëxports- , Text- , pack- , unpack- -- * "Control.Composition" reëxports- , biaxe- , (.*)- , (.**)- , thread- , bisequence'- -- * Dhall reëxports- , Interpret- , Inject- , Generic- , Binary- , input- , auto- , detailed- -- * Shake reëxports- , Rules- , Action- , command- , command_- , (%>)- , need- , want- , shake- , Rebuild (..)- , (~>)- , cmd- , cmd_- , ShakeOptions (..)- , shakeOptions- , copyFile'- , Change (..)- , Verbosity (..)- , removeFilesAfter- , Lint (..)- , takeBaseName- , takeFileName- , takeDirectory- , (-<.>)- , makeExecutable- -- * "Network.HTTP.Client.TLS" reëxports- , tlsManagerSettings- -- "Network.HTTP.Client" reëxports- , newManager- , parseRequest- , httpLbs- , Response (..)- , Request (method, redirectCount)- -- * "System.FilePath" reëxports- , (</>)- , pathSeparator- -- * ByteString reëxports- , ByteString- -- * Helpers for pretty-printing- , (<#>)- -- * "Text.PrettyPrint.ANSI.Leijen" reëxports- , (<+>)- , text- , punctuate- , dullred- , linebreak- , dullyellow- , hardline- , hang- , indent- , putDoc- , Pretty (pretty)- , module X- -- Lens exports- , Lens'- , over- , _Just- , view- , _1- , _2- , _4- , each- , (&)- , (%~)-#ifdef DEBUG- , traceShowId- , traceShow-#endif- ) where--import Control.Arrow hiding ((<+>))-import Control.Composition-import Control.Monad-import Control.Monad.IO.Class-import Control.Monad.State.Lazy-import Data.Binary-import Data.Bool (bool)-import Data.ByteString.Lazy (ByteString)-import qualified Data.ByteString.Lazy as BSL-import Data.Containers.ListUtils (nubOrd)-import Data.Foldable (fold, traverse_)-import Data.Functor (($>))-#if !MIN_VERSION_base(4,11,0)-import Data.Semigroup-#endif-import Data.List-import Data.Maybe (fromMaybe, isNothing)-import Data.Text.Lazy (Text, pack, unpack)-import Data.Version (showVersion)-#ifdef DEBUG-import Debug.Trace (traceShow, traceShowId)-#endif-import Development.Shake hiding (doesFileExist, getEnv)-import Development.Shake.FilePath-import Dhall hiding (Text, bool)-import Lens.Micro hiding (both)-import Lens.Micro.Extras-import Network.HTTP.Client-import Network.HTTP.Client.TLS (tlsManagerSettings)-import Numeric (showHex)-import System.Directory as X-import System.Environment (getEnv)-import System.Exit (ExitCode (ExitSuccess), exitWith)-import System.Info (os)-#ifndef mingw32_HOST_OS-import System.Posix.Files-#endif-import System.Process as X-import System.Process.Ext-import Text.PrettyPrint.ANSI.Leijen hiding (bool, group, (<$>), (</>), (<>))--infixr 5 <#>--#ifdef mingw32_HOST_OS-makeExecutable :: FilePath -> IO ()-makeExecutable = pure mempty-#else-makeExecutable :: FilePath -> IO ()-makeExecutable = flip setFileMode ownerModes-#endif--nubSpecial :: (Ord a) => [[a]] -> [[a]]-nubSpecial = fmap pure . nubOrd . join--makeExe :: String-makeExe = case os of- "freebsd" -> "gmake"- "openbsd" -> "gmake"- "netbsd" -> "gmake"- "solaris" -> "gmake"- "dragonfly" -> "gmake"- _ -> "make"--hex :: Int -> String-hex = flip showHex mempty---- | Same as "Text.PrettyPrint.ANSI.Leijen"'s @<$>@, but doesn't clash with the--- prelude.-(<#>) :: Doc -> Doc -> Doc-(<#>) a b = a <> line <> b--shouldWrite :: (MonadIO m, Binary a) => a -> FilePath -> m Bool-shouldWrite x fp = do- exists <- liftIO (doesFileExist fp)- contents <- if exists- then liftIO (BSL.readFile fp)- else pure mempty- pure $ BSL.length contents /= 0 && encode x /= contents
man/atspkg.1 view
@@ -1,4 +1,4 @@-.\" Automatically generated by Pandoc 2.3.1+.\" Automatically generated by Pandoc 2.4 .\" .TH "atspkg (1)" "" "" "" "" .hy@@ -7,7 +7,7 @@ atspkg \- a build tool for ATS .SH DESCRIPTION .PP-\f[B]atspkg\f[] is a build tool for the ATS2 language, written in+\f[B]atspkg\f[R] is a build tool for the ATS2 language, written in Haskell. .SH SYNOPSIS .PP@@ -20,88 +20,71 @@ atspkg test .SH SUBCOMMANDS .PP-\f[B]build\f[] \- Build all binary targets listed in atspkg.dhall+\f[B]build\f[R] \- Build all binary targets listed in atspkg.dhall .PP-\f[B]test\f[] \- Run all tests listed in atspkg.dhall+\f[B]test\f[R] \- Run all tests listed in atspkg.dhall .PP-\f[B]clean\f[] \- Clean current project directory+\f[B]clean\f[R] \- Clean current project directory .PP-\f[B]nuke\f[] \- Remove all local files installed by \f[B]atspkg\f[]+\f[B]nuke\f[R] \- Remove all local files installed by \f[B]atspkg\f[R] .PP-\f[B]remote\f[] \- Download a tarball from the given URL and try to+\f[B]remote\f[R] \- Download a tarball from the given URL and try to build its binary targets .PP-\f[B]install\f[] \- Install binary targets to $HOME/.local/bin and+\f[B]install\f[R] \- Install binary targets to $HOME/.local/bin and relevant manpages to $HOME/.local/share/man/man1 .PP-\f[B]upgrade\f[] \- Download the latest binary release of-\f[B]atspkg\f[], if available+\f[B]upgrade\f[R] \- Download the latest binary release of+\f[B]atspkg\f[R], if available .PP-\f[B]valgrind\f[] \- Run \f[B]valgrind\f[] on the generated binary+\f[B]valgrind\f[R] \- Run \f[B]valgrind\f[R] on the generated binary .PP-\f[B]run\f[] \- Run the generated binary+\f[B]run\f[R] \- Run the generated binary .PP-\f[B]check\f[] \- Check a pkg.dhall file to make sure it is well\-typed.+\f[B]check\f[R] \- Check a pkg.dhall file to make sure it is+well\-typed. .PP-\f[B]check\-set\f[] \- Check a package set to make sure it is+\f[B]check\-set\f[R] \- Check a package set to make sure it is well\-typed. .PP-\f[B]list\f[] \- List all available packages in current package set.+\f[B]list\f[R] \- List all available packages in current package set. .PP-\f[B]pack\f[] \- Create a tarball suitable for packaging the compiler.+\f[B]pack\f[R] \- Create a tarball suitable for packaging the compiler. Takes as an argument a directory containing the unpacked compiler. .PP-\f[B]setup\f[] \- Set up manpages and shell completions.+\f[B]setup\f[R] \- Set up manpages and shell completions. .SH OPTIONS .TP-.B \f[B]\-h\f[] \f[B]\-\-help\f[]+.B \f[B]\-h\f[R] \f[B]\-\-help\f[R] Display help-.RS-.RE .TP-.B \f[B]\-V\f[] \f[B]\-\-version\f[]+.B \f[B]\-V\f[R] \f[B]\-\-version\f[R] Display version information-.RS-.RE .TP-.B \f[B]\-\-pkg\-args\f[]+.B \f[B]\-\-pkg\-args\f[R] Arguments to be passed to atspkg.dhall-.RS-.RE .TP-.B \f[B]\-c\f[] \f[B]\-\-no\-cache\f[]+.B \f[B]\-c\f[R] \f[B]\-\-no\-cache\f[R] Ignore cached configuration file-.RS-.RE .TP-.B \f[B]\-r\f[], \f[B]\-\-rebuild\f[]+.B \f[B]\-r\f[R], \f[B]\-\-rebuild\f[R] Rebuild all binary targets.-.RS-.RE .TP-.B \f[B]\-l\f[], \f[B]\-\-no\-lint\f[]+.B \f[B]\-l\f[R], \f[B]\-\-no\-lint\f[R] Disable the build system linter-.RS-.RE .TP-.B \f[B]\-t\f[], \f[B]\-\-target\f[]+.B \f[B]\-t\f[R], \f[B]\-\-target\f[R] Set the compilation target using its triple.-.RS-.RE .TP-.B \f[B]\-v\f[], \f[B]\-\-verbose\f[]+.B \f[B]\-v\f[R], \f[B]\-\-verbose\f[R] Turn up the verbosity-.RS-.RE .TP-.B \f[B]\-d\f[], \f[B]\-\-detailed\f[]+.B \f[B]\-d\f[R], \f[B]\-\-detailed\f[R] Enable detailed error messages when checking configuration files-.RS-.RE .SH CONFIGURATION .PP-\f[B]atspkg\f[] is configured with Dhall, in an atspkg.dhall file.-\f[B]atspkg\f[] can be configured to produce binary targets, static+\f[B]atspkg\f[R] is configured with Dhall, in an atspkg.dhall file.+\f[B]atspkg\f[R] can be configured to produce binary targets, static library targets, shared object files, or plain C targets. Artifacts can be linked against Haskell libraries if desired. .PP@@ -109,26 +92,26 @@ to configure all builds. .SS TEMPLATES .PP-There are several templates available for \f[B]pi\f[] (see+There are several templates available for \f[B]pi\f[R] (see https://crates.io/crates/project_init for more details). Several examples: .IP .nf \f[C]-pi\ new\ ats\ project-\f[]+pi new ats project+\f[R] .fi .IP .nf \f[C]-pi\ git\ vmchale/haskell\-ats\ ambitious\-project-\f[]+pi git vmchale/haskell\-ats ambitious\-project+\f[R] .fi .IP .nf \f[C]-pi\ git\ vmchale/ats\-haskell\ weird\-project-\f[]+pi git vmchale/ats\-haskell weird\-project+\f[R] .fi .SH BUGS .PP