From a1bf9b57bc5ea7ebab0ba103f20576183461576b Mon Sep 17 00:00:00 2001 From: Matvey Aksenov Date: Tue, 30 Jul 2024 11:24:41 +0000 Subject: [PATCH] 0.5.2 --- CHANGELOG.markdown | 7 +++++-- envparse.cabal | 4 ++-- shell.nix | 2 +- src/Env/Internal/Parser.hs | 3 ++- stack.yaml | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 59ccf37..cc6fb13 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,8 @@ +0.5.2 +===== + + * Added `eitherReader`. (https://github.com/supki/envparse/pull/24) + 0.5.1 ===== @@ -5,8 +10,6 @@ * Added `instance (Field e a, ...) => Field e (Maybe a)` for generic environment parsing. (https://github.com/supki/envparse/pull/16) - * Added `eitherReader`. (https://github.com/supki/envparse/pull/24) - 0.5 === diff --git a/envparse.cabal b/envparse.cabal index e14cdec..e5b496d 100644 --- a/envparse.cabal +++ b/envparse.cabal @@ -1,5 +1,5 @@ name: envparse -version: 0.5.1 +version: 0.5.2 synopsis: Parse environment variables description: Here's a simple example of a program that uses @envparse@'s parser: @@ -69,7 +69,7 @@ source-repository head source-repository this type: git location: https://github.com/supki/envparse - tag: 0.5.1 + tag: 0.5.2 library default-language: diff --git a/shell.nix b/shell.nix index 7caa296..93126fd 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,5 @@ { pkgs ? import {} -, ghc ? pkgs.haskell.compiler.ghc8107 +, ghc ? pkgs.haskell.compiler.ghc948 }: pkgs.mkShell rec { diff --git a/src/Env/Internal/Parser.hs b/src/Env/Internal/Parser.hs index 8ecf5d9..56d4a50 100644 --- a/src/Env/Internal/Parser.hs +++ b/src/Env/Internal/Parser.hs @@ -128,7 +128,8 @@ type Reader e a = String -> Either e a -- | Create a 'Reader' from a simple parser function eitherReader :: Error.AsUnread e => (String -> Either String a) -> Reader e a -eitherReader f s = left (Error.unread . suffix) $ f s +eitherReader f s = + left (Error.unread . suffix) (f s) where suffix x = x <> ": " <> show s diff --git a/stack.yaml b/stack.yaml index 34727ca..77ab732 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-18.28 +resolver: lts-21.25 packages: - '.' allow-newer: true