Skip to content

Commit

Permalink
0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
supki committed Jul 30, 2024
1 parent 3e588a6 commit a1bf9b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
0.5.2
=====

* Added `eitherReader`. (https://github.com/supki/envparse/pull/24)

0.5.1
=====

* Added configurable maximum info block width (https://github.com/supki/envparse/pull/21).

* 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
===

Expand Down
4 changes: 2 additions & 2 deletions envparse.cabal
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ pkgs ? import <nixpkgs> {}
, ghc ? pkgs.haskell.compiler.ghc8107
, ghc ? pkgs.haskell.compiler.ghc948
}:

pkgs.mkShell rec {
Expand Down
3 changes: 2 additions & 1 deletion src/Env/Internal/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-18.28
resolver: lts-21.25
packages:
- '.'
allow-newer: true

0 comments on commit a1bf9b5

Please sign in to comment.