ats-format 0.2.0.35 → 0.2.0.36
raw patch · 4 files changed
+11/−13 lines, 4 filesdep −file-embed
Dependencies removed: file-embed
Files
- .atsfmt.toml +0/−3
- CHANGELOG.md +4/−0
- ats-format.cabal +3/−7
- src/Main.hs +4/−3
− .atsfmt.toml
@@ -1,3 +0,0 @@-ribbon = 0.6 # maximum ribbon fraction-width = 120 # maximum width-clang-format = false # call clang-format on inline code
CHANGELOG.md view
@@ -1,5 +1,9 @@ # ats-format +## 0.22.2.36++ * Don't use `TemplateHaskell`+ ## 0.2.2.35 * Typo correction in manpages
ats-format.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: ats-format-version: 0.2.0.35+version: 0.2.0.36 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2017-2019 Vanessa McHale@@ -12,10 +12,7 @@ category: Parser, Language, ATS, Development build-type: Custom-extra-source-files:- man/atsfmt.1- .atsfmt.toml-+extra-source-files: man/atsfmt.1 extra-doc-files: README.md CHANGELOG.md@@ -41,7 +38,7 @@ hs-source-dirs: src other-modules: Paths_ats_format default-language: Haskell2010- other-extensions: OverloadedStrings TemplateHaskell+ other-extensions: OverloadedStrings ghc-options: -Wall build-depends: base >=4.9 && <5,@@ -51,7 +48,6 @@ ansi-wl-pprint -any, directory -any, process -any,- file-embed >=0.0.9, toml-parser -any if flag(development)
src/Main.hs view
@@ -1,12 +1,10 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-} module Main where import Control.Exception (displayException) import Control.Monad (unless, (<=<)) import Data.Bifunctor (first)-import Data.FileEmbed (embedStringFile) import Data.List (lookup) import Data.Maybe (fromMaybe) import Data.Monoid ((<>))@@ -80,7 +78,10 @@ printFail = pure exitFailure <=< hPutStr stderr defaultConfig :: FilePath -> IO ()-defaultConfig = flip writeFile $(embedStringFile ".atsfmt.toml")+defaultConfig = flip writeFile $+ "ribbon = 0.6 # maximum ribbon fraction\n"+ ++ "width = 120 # maximum width\n"+ ++ "clang-format = false # call clang-format on inline code" asFloat :: Value -> Maybe Float asFloat (Double d) = Just (realToFrac d)