Upgrade dependencies, support autodocodec-yaml 0.2

This commit is contained in:
Tom Sydney Kerckhove 2022-08-05 15:56:22 +02:00
parent 2faf08e6eb
commit d64f5df62e
7 changed files with 29 additions and 30 deletions

View File

@ -37,7 +37,7 @@ library
src
build-depends:
autodocodec
, autodocodec-yaml
, autodocodec-yaml >=0.2
, base >=4.7 && <5
, bytestring
, conduit

View File

@ -14,7 +14,7 @@ library:
source-dirs: src
dependencies:
- autodocodec
- autodocodec-yaml
- autodocodec-yaml >= 0.2
- bytestring
- conduit
- containers

View File

@ -15,7 +15,6 @@ import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.Version
import Data.Yaml (FromJSON, ToJSON)
import qualified Env
@ -300,7 +299,7 @@ flagsParser =
[ Env.helpDoc environmentParser,
"",
"Configuration file format:",
T.unpack (TE.decodeUtf8 (renderColouredSchemaViaCodec @Configuration))
T.unpack (renderColouredSchemaViaCodec @Configuration)
]
data Flags = Flags

View File

@ -20,7 +20,7 @@ putTimedChunks :: TerminalCapabilities -> [Chunk] -> IO ()
putTimedChunks terminalCapabilities chunks = do
now <- getZonedTime
let timeChunk = fore yellow $ chunk $ T.pack $ formatTime defaultTimeLocale "%H:%M:%S" now
putChunksWith terminalCapabilities $ timeChunk : " " : chunks ++ ["\n"]
putChunksLocaleWith terminalCapabilities $ timeChunk : " " : chunks ++ ["\n"]
indicatorChunk :: String -> Chunk
indicatorChunk = fore cyan . chunk . T.pack . printf "%-10s"

View File

@ -13,7 +13,7 @@ import System.Exit
import Text.Colour
import Text.Colour.Layout
#ifdef MIN_VERSION_safe_coloured_text_terminfo
import Text.Colour.Term (putChunks)
import Text.Colour.Term (putChunksLocale)
#endif
import Text.Show.Pretty (pPrint)
@ -64,9 +64,9 @@ combineToSettings flags@Flags {..} environment mConf = do
where
#ifdef MIN_VERSION_safe_coloured_text_terminfo
put = putChunks
put = putChunksLocale
#else
put = putChunksWith WithoutColours
put = putChunksLocaleWith WithoutColours
#endif
prettyConfiguration :: Maybe Configuration -> [[Chunk]]

View File

@ -5,10 +5,10 @@
"homepage": "",
"owner": "NorfairKing",
"repo": "autodocodec",
"rev": "a60fbd4db121c0529f9ceb68c58c289daa693db2",
"sha256": "123yb0hncbjdnykzs6mklyk5j5d0kmw47k5gn6icawbak5r9z3a9",
"rev": "98135d2b24c4c52f56f53c6650a169aeec61c7f1",
"sha256": "0srbn65343a213690samf7pf2q0kvnngpv6wn0srm57dpv0f68hn",
"type": "tarball",
"url": "https://github.com/NorfairKing/autodocodec/archive/a60fbd4db121c0529f9ceb68c58c289daa693db2.tar.gz",
"url": "https://github.com/NorfairKing/autodocodec/archive/98135d2b24c4c52f56f53c6650a169aeec61c7f1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"gitignore": {
@ -17,10 +17,10 @@
"homepage": "",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a",
"sha256": "0va0janxvmilm67nbl81gdbpppal4aprxzb25gp9pqvf76ahxsci",
"rev": "f2ea0f8ff1bce948ccb6b893d15d5ea3efaf1364",
"sha256": "02q2yvakyh9x9h9x9az2rr3h6h0zymhrl0z2xflc6blvz6zzqkf2",
"type": "tarball",
"url": "https://github.com/hercules-ci/gitignore.nix/archive/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a.tar.gz",
"url": "https://github.com/hercules-ci/gitignore.nix/archive/f2ea0f8ff1bce948ccb6b893d15d5ea3efaf1364.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
@ -41,10 +41,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d17a56d90ecbd1b8fc908d49598fb854ef188461",
"sha256": "04a9ry0kk4qzy622mk3izh4azdp7plf1847mfp3zkn9gk0innswg",
"rev": "478f3cbc8448b5852539d785fbfe9a53304133be",
"sha256": "1xdr33l7hg7v81dm4m5a8hysa33z6gqisq0hyrdkds3yrnnxfp2w",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/d17a56d90ecbd1b8fc908d49598fb854ef188461.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/478f3cbc8448b5852539d785fbfe9a53304133be.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"pre-commit-hooks": {
@ -65,10 +65,10 @@
"homepage": "https://cs-syd.eu/posts/2021-03-07-safe-coloured-text",
"owner": "NorfairKing",
"repo": "safe-coloured-text",
"rev": "d1a727998fa58ecf38022906b552d33e57e3f308",
"sha256": "139ihi0hixmbnk4i5karmgc26fmqh8kzp37rcv7x5jlw9lwdqp8n",
"rev": "675cb01fce5f46718416d7746de5b856ed90a63f",
"sha256": "18lf28k51f24smkyba0dfv1hqz3jxfqr81w70zjvbw77z5q0vxf6",
"type": "tarball",
"url": "https://github.com/NorfairKing/safe-coloured-text/archive/d1a727998fa58ecf38022906b552d33e57e3f308.tar.gz",
"url": "https://github.com/NorfairKing/safe-coloured-text/archive/675cb01fce5f46718416d7746de5b856ed90a63f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"sydtest": {
@ -77,10 +77,10 @@
"homepage": "",
"owner": "NorfairKing",
"repo": "sydtest",
"rev": "cf1bb414f0c0ce7bbf64659da94b8cd890c9e536",
"sha256": "0z6araz20lkgc7q2r5z423hbis4jzvkkqgiawh69wslakqlznxzc",
"rev": "130de92053c1c3d60a8f45d509210415ffbea530",
"sha256": "1873sjmmxfmf2iig5p1ka0y7n7n1zmiv92d6pq4cyc9a2f10184a",
"type": "tarball",
"url": "https://github.com/NorfairKing/sydtest/archive/cf1bb414f0c0ce7bbf64659da94b8cd890c9e536.tar.gz",
"url": "https://github.com/NorfairKing/sydtest/archive/130de92053c1c3d60a8f45d509210415ffbea530.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"validity": {
@ -89,10 +89,10 @@
"homepage": "https://www.youtube.com/watch?v=eIs9qNh17SM",
"owner": "NorfairKing",
"repo": "validity",
"rev": "d88be911a7e2a84f6c089e9269aaed8d10a74acd",
"sha256": "088zl9vp7579qj1gqh1j8kb0035zjjp41k1yiww58x57pym200g7",
"rev": "8373ac5f0f02ad66f1b83c9bf572290430e84062",
"sha256": "04rs2hq9xz9y8w5zpc15zazm8dcbkd5kryh4cy7yww187jgp0saq",
"type": "tarball",
"url": "https://github.com/NorfairKing/validity/archive/d88be911a7e2a84f6c089e9269aaed8d10a74acd.tar.gz",
"url": "https://github.com/NorfairKing/validity/archive/8373ac5f0f02ad66f1b83c9bf572290430e84062.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

View File

@ -8,23 +8,23 @@ ghc-options:
extra-deps:
- github: NorfairKing/safe-coloured-text
commit: d1a727998fa58ecf38022906b552d33e57e3f308
commit: 675cb01fce5f46718416d7746de5b856ed90a63f
subdirs:
- safe-coloured-text
- safe-coloured-text-layout
- safe-coloured-text-terminfo
- github: NorfairKing/sydtest
commit: cf1bb414f0c0ce7bbf64659da94b8cd890c9e536
commit: 130de92053c1c3d60a8f45d509210415ffbea530
subdirs:
- sydtest
- github: NorfairKing/autodocodec
commit: a60fbd4db121c0529f9ceb68c58c289daa693db2
commit: 98135d2b24c4c52f56f53c6650a169aeec61c7f1
subdirs:
- autodocodec
- autodocodec-schema
- autodocodec-yaml
- github: NorfairKing/validity
commit: d88be911a7e2a84f6c089e9269aaed8d10a74acd
commit: 8373ac5f0f02ad66f1b83c9bf572290430e84062
subdirs:
- genvalidity
- genvalidity-aeson