htoml 1.0.0.0 → 1.0.0.1
raw patch · 3 files changed
+57/−26 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.md +3/−0
- README.md +53/−25
- htoml.cabal +1/−1
CHANGES.md view
@@ -4,6 +4,9 @@ #### dev * ... +### 1.0.0.1+* Improve docs+ ### 1.0.0.0 * Use `Vector` over `List` internally, as per discussion in [issue 13](https://github.com/cies/htoml/issues/13)
README.md view
@@ -5,8 +5,8 @@ [](https://hackage.haskell.org/package/html) [](https://hackage.haskell.org/package/html) -[](http://stackage.org/lts-2/package/htoml)-[](http://stackage.org/lts-3/package/htoml)+[](http://stackage.org/lts-4/package/htoml)+[](http://stackage.org/lts-5/package/htoml) [](http://stackage.org/nightly/package/htoml) @@ -23,13 +23,22 @@ TOML is to configuration files, like what Markdown is for rich-text. This library aims to be compatible with the latest version of the-[TOML spec](https://github.com/mojombo/toml), currently that is-[v0.4.0](https://github.com/toml-lang/toml/releases/tag/v0.4.0).+[TOML spec](https://github.com/mojombo/toml).+Compatibility between `htoml` version and TOML (as proven by+[BurntSushi's language agnostic TOML test suite]())+is as follows: -The documentation for this package may (or may not) be found on-[Hackage](https://hackage.haskell.org/package/htoml).+* [TOML v0.4.0](https://github.com/toml-lang/toml/releases/tag/v0.4.0)+is implemented by `htoml >= 1.0.0.0`+* *(currently only one item in this mapping, more will follow)* +### Documentation++Apart from this README, documentation for this package may+(or may not) be found on [Hackage](https://hackage.haskell.org/package/htoml).++ ### Quick start Installing `htoml` is easy. Either by using@@ -65,24 +74,44 @@ stack solver --update-config -We can now start exploring `htoml` from a GHCi REPL.+We can now start exploring `htoml` from a GHCi REPL. For instance+by reading a `.toml` file from the banchmarks, with: - > txt <- readFile "benchmarks/example.toml"- > let r = parseTomlDoc "" txt- > r+```haskell+txt <- readFile "benchmarks/example.toml"+let r = parseTomlDoc "" txt+r+```++...which prints:+ Right (fromList [("database",VTable (fromList [("enabled",VBoolean True),("po [...] - > let Right toml = r- > toJSON toml+Then converting it to [Aeason's JSON](https://hackage.haskell.org/package/aeson), with:++```haskell+let Right toml = r+toJSON toml+```++...which prints:+ Object (fromList [("database",Object (fromList [("enabled",Bool True),("po [...] - > let Left err = parseTomlDoc "" "== invalid toml =="- > err+Finally here an parse error produced with:++```haskell+let Left err = parseTomlDoc "" "== invalid toml =="+err+```++...which errors out showing:+ (line 1, column 1): unexpected '='- expecting "#", "\n", "\r\n", letter or digit, "_", "-", "\"", "'", "[" or end of inputr+ expecting "#", "\n", "\r\n", letter or digit, "_", "-", "\"", "'", "[" or end of input -Notice that some outputs are truncated, indicated by `[...]`.+**Note:** Some of the above outputs are truncated, indicated by `[...]`. ### How to pull data from a TOML file after parsing it@@ -134,10 +163,7 @@ If you encounter any problems because `htoml`'s dependecies are constrained either too much or too little, please [file a issue](https://github.com/cies/htoml/issues) for that.--I will try to have `htoml` included in [Stackage](http://stackage.org)-as soon as it is reviewed by the community. Stackage provides a very-attractive solution to most (dependency) version conflicts.+Or off even better submit a PR. ### Tests and benchmarks@@ -176,19 +202,21 @@ * Fails on mix-type arrays (as per spec) * Comes with a benchmark suite to make performance gains/regressions measurable * Tries to be well documented (please raise an issue if you find documentation lacking)-* Available on [Stackage](http://stackage.org) (nightlies for far -- 10 may 2016)+* Available on [Stackage](http://stackage.org) (see top of this README for badges+ indicating TOMLs *inclusion in Stackage status*) ### Todo -* Once 1.0 is out, keep a compatibility chart showing which versions of htoml are- compatible with which versions of the TOML spec-* More documentation+* More documentation and start to use the proper Haddock idioms * Add property tests with QuickCheck (the internet says it's possible for parsers)-* Extensively test error cases+* Extensively test error cases (probably improving error reporting along the way) * See how lenses may (or may not) fit into this package, or an additional package * Consider moving to [one of the more modern parser combinators](https://www.reddit.com/r/haskell/comments/46u45o/what_is_the_current_state_of_parser_libraries_in) in Haskell (`megaparsec` maybe?) -- possibly wait until a clear winner shows++Do you see todo that looks like fun thing to implement and you can spare the time?+Please knoe that PRs are welcome :) ### Acknowledgements
htoml.cabal view
@@ -1,5 +1,5 @@ name: htoml-version: 1.0.0.0+version: 1.0.0.1 synopsis: Parser for TOML files description: TOML is an obvious and minimal format for config files. .