summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmchale <>2018-09-04 22:57:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-09-04 22:57:00 (GMT)
commit1cf337f86ab8840c718cc7d209e708aeeea0184b (patch)
tree27759d23fbc1d3845e068412a1eb80cec7f7fa1f
parent83111ed89512d56c101e41091b26b4cfb3988feb (diff)
version 0.1.0.360.1.0.36
-rw-r--r--README.md2
-rw-r--r--Setup.hs2
-rw-r--r--app/Main.hs16
-rwxr-xr-x[-rw-r--r--]cabal.project.local0
-rw-r--r--stack.yaml4
-rw-r--r--tomlcheck.cabal11
6 files changed, 14 insertions, 21 deletions
diff --git a/README.md b/README.md
index b626237..ca5c91a 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Install [GHC](https://www.haskell.org/ghc/download.html) along with
```bash
$ cabal update
- $ cabal install tomlcheck
+ $ cabal new-install tomlcheck
```
## Use
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
index 9a994af..0000000
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/app/Main.hs b/app/Main.hs
index 506f324..472e079 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -7,15 +7,13 @@ module Main
( main
) where
-import Control.Applicative
import Control.Monad
-import qualified Data.Text.IO as TIO
-import Data.Traversable (traverse)
-import GHC.Generics (Generic)
+import qualified Data.Text.IO as TIO
+import GHC.Generics (Generic)
import Options.Generic
-import System.Exit (ExitCode (..), exitWith)
-import Text.Megaparsec (parseErrorPretty)
-import Text.Toml (parseTomlDoc)
+import System.Exit (ExitCode (..), exitWith)
+import Text.Megaparsec (errorBundlePretty)
+import Text.Toml (parseTomlDoc)
newtype Program = Program { file :: [FilePath] <?> "Path to file to be checked." }
deriving (Generic)
@@ -32,7 +30,7 @@ main = do
let paths = unHelpful $ file x
contents <- traverse TIO.readFile paths
case zipWithM parseTomlDoc paths contents of
- Right _ -> pure ()
+ Right _ -> mempty
Left e -> do
- putStrLn $ parseErrorPretty e
+ putStrLn $ errorBundlePretty e
exitWith (ExitFailure 1)
diff --git a/cabal.project.local b/cabal.project.local
index 841bf2b..841bf2b 100644..100755
--- a/cabal.project.local
+++ b/cabal.project.local
diff --git a/stack.yaml b/stack.yaml
deleted file mode 100644
index 74d6498..0000000
--- a/stack.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-resolver: lts-11.7
-extra-deps:
- - htoml-megaparsec-1.1.0.4
diff --git a/tomlcheck.cabal b/tomlcheck.cabal
index e938589..b7b9255 100644
--- a/tomlcheck.cabal
+++ b/tomlcheck.cabal
@@ -1,6 +1,6 @@
cabal-version: 1.18
name: tomlcheck
-version: 0.1.0.29
+version: 0.1.0.36
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2017-2018 Vanessa McHale
@@ -15,7 +15,6 @@ category: Toml, Data
build-type: Simple
extra-source-files:
cabal.project.local
- stack.yaml
extra-doc-files: README.md
source-repository head
@@ -32,12 +31,14 @@ executable tomlcheck
main-is: Main.hs
hs-source-dirs: app
default-language: Haskell2010
+ other-extensions: DataKinds DeriveGeneric OverloadedStrings
+ TypeOperators
ghc-options: -Wall
build-depends:
- base >=4.7 && <5,
- htoml-megaparsec >=1.0.1.11,
+ base >=4.9 && <5,
+ htoml-megaparsec >=2.1.0.0,
optparse-generic -any,
- megaparsec >=6.0,
+ megaparsec >=7.0,
text -any
if flag(development)