packages feed

ats-pkg 2.4.2.18 → 2.4.2.19

raw patch · 8 files changed

+34/−9 lines, 8 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Language.ATS.Package: [$sel:completions:Pkg] :: Pkg -> Maybe Text
+ Language.ATS.Package: [_atsPkgSet] :: ATSPackageSet -> [ATSDependency]
- Language.ATS.Package: Pkg :: [Bin] -> [Bin] -> [Lib] -> Maybe Text -> Version -> Version -> [LibDep] -> [LibDep] -> [LibDep] -> Text -> [Text] -> [Text] -> Text -> Pkg
+ Language.ATS.Package: Pkg :: [Bin] -> [Bin] -> [Lib] -> Maybe Text -> Maybe Text -> Version -> Version -> [LibDep] -> [LibDep] -> [LibDep] -> Text -> [Text] -> [Text] -> Text -> Pkg

Files

README.md view
@@ -19,6 +19,7 @@   * Run builds in parallel (like `make`)   * Handle flags and libraries for garbage collection when specified   * Install `patscc` and other ATS tooling+  * Install manual pages and shell completions  Things that `atspkg` will not do for you: 
ats-pkg.cabal view
@@ -1,5 +1,5 @@ name:                ats-pkg-version:             2.4.2.18+version:             2.4.2.19 synopsis:            A build tool for ATS description:         A collection of scripts to simplify building ATS projects. homepage:            https://github.com/vmchale/atspkg#readme
man/atspkg.1 view
@@ -42,6 +42,8 @@ \f[B]run\f[] \- Run the generated binary .PP \f[B]check\f[] \- Check a pkg.dhall file to make sure it is well\-typed.+.PP+\f[B]list\f[] \- List all available packages in current package set. .SS OPTIONS .TP .B \f[B]\-h\f[] \f[B]\-\-help\f[]
src/Language/ATS/Package/Build.hs view
@@ -76,6 +76,14 @@                 need [mt']                 copyFile' mt' manDest             Nothing -> pure ()+        co <- compleat+        case completions config of+            Just com -> if not co then pure () else do+                let com' = unpack com+                    comDest = home <> "/.compleat/" <> takeFileName com'+                need [com']+                copyFile' com' comDest+            Nothing -> pure ()  mkManpage :: Rules () mkManpage = do@@ -196,7 +204,7 @@             -> Maybe String -- ^ Optional compiler triple (overrides 'ccompiler')             -> Pkg -- ^ Package data type             -> Rules ()-pkgToAction setup rs tgt ~(Pkg bs ts libs mt v v' ds cds bdeps ccLocal cf as cdir) =+pkgToAction setup rs tgt ~(Pkg bs ts libs mt _ v v' ds cds bdeps ccLocal cf as cdir) =      unless (rs == ["clean"]) $ do 
src/Language/ATS/Package/Exec.hs view
@@ -88,11 +88,11 @@ targets = targetP mempty many  targetP :: Mod ArgumentFields String -> (Parser String -> a) -> String -> a-targetP completions f s = f+targetP completions' f s = f     (argument str     (metavar "TARGET"     <> help ("Targets to " <> s)-    <> completions))+    <> completions'))  build' :: Parser Command build' = Build
src/Language/ATS/Package/PackageSet.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings          #-} {-# LANGUAGE RecordWildCards            #-}+{-# LANGUAGE TemplateHaskell            #-}  module Language.ATS.Package.PackageSet ( ATSPackageSet (..)                                        , setBuildPlan@@ -17,15 +18,18 @@ import           Language.ATS.Package.Type import           Quaalude -newtype ATSPackageSet = ATSPackageSet [ ATSDependency ]+newtype ATSPackageSet = ATSPackageSet { _atsPkgSet :: [ ATSDependency ] }     deriving (Interpret, Show) +makeLenses ''ATSPackageSet+ instance Pretty Version where     pretty v = text (show v)  instance Pretty ATSDependency where-    pretty (ATSDependency ln _ url Nothing v _) = dullyellow (text (unpack ln)) <#> indent 4 ("url:" <+> text (unpack url) <#> "version:" <+> pretty v) <> hardline-    pretty (ATSDependency ln _ url (Just d) v _) = dullyellow (text (unpack ln)) <#> indent 4 ("description:" <+> text (unpack d) <#> "url:" <+> text (unpack url) <#> "version:" <+> pretty v) <> hardline+    pretty (ATSDependency ln _ url md v _) = dullyellow (text (unpack ln)) <#> indent 4 (g md "url:" <+> text (unpack url) <#> "version:" <+> pretty v) <> hardline+        where g (Just d) = ("description:" <+> text (unpack d) <#>)+              g Nothing  = id  instance Pretty ATSPackageSet where     pretty (ATSPackageSet ds) = mconcat (punctuate hardline (pretty <$> ds))@@ -34,7 +38,8 @@ displayList = putDoc . pretty <=< listDeps  listDeps :: String -> IO ATSPackageSet-listDeps = input auto . pack+listDeps = fmap s . input auto . pack+    where s = over atsPkgSet (sortBy (compare `on` libName))  setBuildPlan :: FilePath -- ^ Filepath for cache inside @.atspkg@              -> String -- ^ URL of package set to use.
src/Language/ATS/Package/Type.hs view
@@ -89,6 +89,7 @@                , test         :: [Bin] -- ^ List of test suites                , libraries    :: [Lib] -- ^ List of libraries to be built                , man          :: Maybe Text -- ^ Optional (markdown) manpages to be converted using @pandoc@.+               , completions  :: Maybe Text -- ^ Optional @compleat@ completions to be installed alongside package.                , version      :: Version -- ^ Library version                , compiler     :: Version -- ^ Compiler version                , dependencies :: [LibDep] -- ^ List of dependencies
src/Quaalude.hs view
@@ -2,6 +2,7 @@  module Quaalude ( bool                 , intersperse+                , sortBy                 , void                 , unless                 , when@@ -89,12 +90,15 @@                 , module X                 -- Lens exports                 , over+                , view                 , _1                 , _2                 , makeLensesFor+                , makeLenses                 , each                 , (&)                 , (%~)+                -- , maybeDo                 ) where  import           Control.Arrow                hiding ((<+>))@@ -111,7 +115,7 @@ import           Control.Monad import           Data.Binary import           Data.Bool                    (bool)-import           Data.List                    (intersperse, isPrefixOf, isSuffixOf)+import           Data.List                    (intersperse, isPrefixOf, isSuffixOf, sortBy) import           Data.Maybe                   (fromMaybe) import           Data.Text.Lazy               (pack, unpack) import           Development.Shake            hiding (getEnv)@@ -122,6 +126,10 @@ import           Text.PrettyPrint.ANSI.Leijen hiding (bool, (<>))  infixr 5 <#>++-- maybeDo :: Monad m => Maybe (m ()) -> m ()+-- maybeDo (Just a) = a+-- maybeDo _        = pure ()  -- | Same as "Text.PrettyPrint.ANSI.Leijen"'s @<$>@, but doesn't clash with the -- prelude.