Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Hamlin committed Nov 30, 2017
1 parent 7e88633 commit 913f963
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
12 changes: 11 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Revision history for config-parser

## 0.1.0.0 -- YYYY-mm-dd
## 1.0.0.0 -- 2017-12-04

* Removed 'ConfigParser' constructor with janky call to 'error'. Non-unique keys
will now cause parsing to fail, instead.
* Duplicate keys in config files will now cause parsing to fail.
* 'ConfigOption' now has a 'required' field to specify that omitting a
particular key from a config file is an error. Omiting required keys causes
parsing to fail.
* The 'boundedIntegral' parser is now correctly exported.

## 0.2.0.0 -- 2017-10-31

* First version. Released on an unsuspecting world.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,22 @@ import Text.ConfigParser
cp :: ConfigParser (Maybe String, Maybe Integer, [Integer])
cp = configParser (Nothing, Nothing, [])
[ ConfigOption
{ key = "a_string"
, parser = string
, action = \s (_,n,ns) -> (Just s, n, ns)
{ key = "a_string"
, required = True
, parser = string
, action = \s (_,n,ns) -> (Just s, n, ns)
}
, ConfigOption
{ key = "a_number"
, parser = integer
, action = \n (s,_,ns) -> (s, Just n, ns)
{ key = "a_number"
, required = True
, parser = integer
, action = \n (s,_,ns) -> (s, Just n, ns)
}
, ConfigOption
{ key = "a_list"
, parser = list integer
, action = \ns (s,n,_) -> (s, n, ns)
{ key = "a_list"
, required = True
, parser = list integer
, action = \ns (s,n,_) -> (s, n, ns)
}
]

Expand Down
2 changes: 1 addition & 1 deletion config-parser.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: config-parser
version: 0.2.0.0
version: 1.0.0.0
synopsis: Parse config files using parsec and generate parse errors
on unhandled keys
description: This is yet another entry in Haskell's enourmous collection
Expand Down

0 comments on commit 913f963

Please sign in to comment.