packages feed

ats-format 0.1.0.2 → 0.1.0.3

raw patch · 6 files changed

+12/−9 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

.travis.yml view
@@ -60,13 +60,13 @@       echo "skipping yaml verification..."     fi   - stack build --test --bench --no-run-tests --no-run-benchmarks+  - find -name atsfmt -executable   - |     if [ `uname` = "Darwin" ]     then       export BINPATH="$(find . -name atsfmt -perm 755 | tail -n1)"     else-      rm -rf .stack-work-      export BINPATH="$(find -name atsfmt -executable | tail -n1 | head -n1)"+      export BINPATH="$(find -name atsfmt -executable | tail -n1)"     fi   - echo $BINPATH   - mv $BINPATH atsfmt-$TARGET
ats-format.cabal view
@@ -1,5 +1,5 @@ name:                ats-format-version:             0.1.0.2+version:             0.1.0.3 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
src/Language/ATS/Exec.hs view
@@ -115,7 +115,8 @@ fancyError = either (printFail . show . pretty) pure  pick :: Program -> IO ()-pick (Program (Just p) False nc _) = (genErr nc . parseATS . lexATS) =<< readFile p-pick (Program Nothing _ nc False)  = (genErr nc . parseATS . lexATS) =<< getContents-pick (Program Nothing _ _ True)    = defaultConfig ".atsfmt.toml"-pick (Program (Just p) True _ _)   = inplace p (fmap printATS . fancyError . parseATS . lexATS)+pick (Program (Just p) False nc _)  = (genErr nc . parseATS . lexATS) =<< readFile p+pick (Program Nothing _ nc False)   = (genErr nc . parseATS . lexATS) =<< getContents+pick (Program Nothing _ _ True)     = defaultConfig ".atsfmt.toml"+pick (Program (Just p) True True _) = inplace p (fmap printATS . fancyError . parseATS . lexATS)+pick (Program (Just p) True _ _)    = inplace p ((printCustom <=< fancyError) . parseATS . lexATS)
src/Language/ATS/Lexer.x view
@@ -89,6 +89,7 @@ tokens :-      $white+                  ;+    ^ "//".*                 { tok (\p s -> CommentLex p s) }     "//".*                   ;     @block_comment           ;     "#define".*              { tok (\p s -> MacroBlock p s) }      
src/Language/ATS/Parser.y view
@@ -142,6 +142,7 @@     cblock { CBlockLex _ $$ }     ref { RefTok $$ }     define { MacroBlock _ $$ }+    lineComment { CommentLex _ $$ }  %% @@ -418,7 +419,7 @@             | abstype identifier openParen FullArgs closeParen eq Type { AbsType $1 $2 $4 $7 }             | datatype identifier eq Leaves { SumType $2 $4 }             | dataprop identifier openParen FullArgs closeParen eq DataPropLeaves { DataProp $1 $2 $4 $7 }-            -- | tkindef FunName eq string { TKind $1 $2 $4 }+            | lineComment { Comment $1 }             | define { Define $1 }             | cblock { CBlock $1 }             | lambda {% Left $ Expected $1 "Declaration" "lam" }
stack.yaml view
@@ -1,5 +1,5 @@ ----resolver: nightly-2017-12-07+resolver: lts-10.0 packages:   - '.' extra-deps: