ats-format 0.2.0.4 → 0.2.0.5
raw patch · 5 files changed
+16/−18 lines, 5 filesdep −composition-preludePVP ok
version bump matches the API change (PVP)
Dependencies removed: composition-prelude
API changes (from Hackage documentation)
Files
- .travis.yml +3/−3
- Justfile +3/−4
- ats-format.cabal +1/−2
- src/Language/ATS/Exec.hs +8/−8
- stack.yaml +1/−1
.travis.yml view
@@ -42,7 +42,7 @@ fi install:- - stack --no-terminal --install-ghc build --test --bench --no-run-tests --no-run-benchmarks --only-dependencies+ - stack --no-terminal --install-ghc build --only-dependencies script: - stack --no-terminal build --haddock --no-haddock-deps --test --bench --no-run-tests --no-run-benchmarks@@ -56,12 +56,12 @@ yamllint .travis.yml yamllint .hlint.yaml yamllint .stylish-haskell.yaml- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s src app test/ bench+ curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s src app curl -sL https://raw.github.com/ndmitchell/weeder/master/misc/travis.sh | sh -s . else echo "skipping yaml verification..." fi- - stack build --test --bench --no-run-tests --no-run-benchmarks+ - stack build - | if [ `uname` = "Darwin" ] then
Justfile view
@@ -43,14 +43,13 @@ ci: test cabal new-build cabal new-haddock- cabal new-test- hlint src app bench test+ hlint src app tomlcheck --file .atsfmt.toml yamllint .travis.yml yamllint .hlint.yaml yamllint .stylish-haskell.yaml yamllint .yamllint- stack build --test --bench --no-run-tests --no-run-benchmarks+ stack build weeder test:@@ -61,7 +60,7 @@ cd polyglot && atsfmt src/concurrency.dats -i cd polyglot && atsfmt src/shared.dats -i cd polyglot && atsfmt src/filetype.sats -i- cd polyglot && ./bash/setup.sh && ./build+ cd polyglot && ./bash/bootstrap.sh && ./build @rm -rf polyglot size:
ats-format.cabal view
@@ -1,5 +1,5 @@ name: ats-format-version: 0.2.0.4+version: 0.2.0.5 synopsis: A source-code formatter for ATS description: An opinionated source-code formatter for [ATS](http://www.ats-lang.org/). homepage: https://hub.darcs.net/vmchale/ats-format#readme@@ -43,7 +43,6 @@ build-depends: base >= 4.10 && < 5 , language-ats , optparse-applicative- , composition-prelude >= 0.1.1.2 , htoml-megaparsec >= 1.1.0.0 , text , ansi-wl-pprint
src/Language/ATS/Exec.hs view
@@ -4,7 +4,7 @@ module Language.ATS.Exec ( exec ) where -import Control.Arrow hiding ((<+>))+import Control.Arrow import Control.Monad (unless, (<=<)) import Data.FileEmbed (embedStringFile) import qualified Data.HashMap.Lazy as HM@@ -18,10 +18,10 @@ import System.Directory (doesFileExist) import System.Exit (exitFailure) import System.IO (hPutStr, stderr)+import System.Process (readCreateProcess, shell) import Text.PrettyPrint.ANSI.Leijen (pretty) import Text.Toml import Text.Toml.Types hiding (Parser)-import System.Process (readCreateProcess, shell) data Program = Program { _path :: Maybe FilePath, _inplace :: Bool, _noConfig :: Bool, _defaultConfig :: Bool } @@ -31,17 +31,17 @@ takeBlock [] = ([], []) rest :: String -> IO String-rest xs = fmap (<> (snd $ takeBlock xs)) $ printClang (fst $ takeBlock xs)+rest xs = (<> (snd $ takeBlock xs)) <$> printClang (fst $ takeBlock xs) printClang :: String -> IO String printClang = readCreateProcess (shell "clang-format") processClang :: String -> IO String-processClang ('%':'{':'^':xs) = fmap (('%':) . ('{':) . ('^':)) $ rest xs-processClang ('%':'{':'#':xs) = fmap (('%':) . ('{':) . ('#':)) $ rest xs-processClang ('%':'{':'$':xs) = fmap (('%':) . ('{':) . ('$':)) $ rest xs-processClang ('%':'{':xs) = fmap (('%':) . ('{':)) $ rest xs-processClang (x:xs) = fmap (x:) $ processClang xs+processClang ('%':'{':'^':xs) = ('%':) . ('{':) . ('^':) <$> rest xs+processClang ('%':'{':'#':xs) = ('%':) . ('{':) . ('#':) <$> rest xs+processClang ('%':'{':'$':xs) = ('%':) . ('{':) . ('$':) <$> rest xs+processClang ('%':'{':xs) = ('%':) . ('{':) <$> rest xs+processClang (x:xs) = (x:) <$> processClang xs processClang [] = pure [] file :: Parser Program
stack.yaml view
@@ -9,7 +9,7 @@ - dirstream-1.0.3 - hspec-dirstream-0.3.0.0 - cli-setup-0.1.0.3- - language-ats-0.1.0.0+ - language-ats-0.1.0.1 flags: ats-format: development: false