- Added
ToValue UTCTime
andFromValue UTCTime
. These correspond to offset data-times with the timezone translated to UTC.
- Pervasive annotations on the values added to allow for detailed positional error reporting throughout parsing and validation.
- Replace uses of String with Text in the Value type and throughout the API
- Reorganized almost all of the modules to minimize imports that upstream packages will actually need.
- Added
IsString Value
instance. - Addded helpers for
runMatcher
for ignoring and failing on warningrunMatcherIgnoreWarn
andrunMatcherFatalWarn
- Added
Toml.Generic
to make instances easily derivable via DerivingVia. - Added GHC.Generics support for switching between product types and TOML arrays.
- Bugfix: Previous fix admitted some invalid inline tables - these are now rejected
- Bugfix: In some cases overlapping keys in inline tables could throw an exception instead instead of returning the proper semantic error value.
- Ensure years are rendered zero-padded
- Added
Toml.Semantics.Ordered
for preserving input TOML orderings - Added support for pretty-printing multi-line strings
- Make more structured error messages available in the low-level modules.
Consumers of the
Toml
module can keep getting simple error strings and users interested in structured errors can run the different layers independently to get more detailed error reporting. FromValue
andToValue
instances for:Ratio
,NonEmpty
,Seq
- Add
FromKey
andToKey
for allowing codecs forMap
to use various key types.
- Added
Toml.Pretty.prettyTomlOrdered
to allow user-specified section ordering. - Added
FromValue
andToValue
instances forText
- Added
reqKeyOf
andoptKeyOf
for easier custom matching withoutFromValue
instances.
-
Remove
FromTable
class. This class existed for things that could be matched specifically from tables, which is what the top-level values always are. HoweverFromValue
already handles this, and both classes can fail, so having the extra level of checking doesn't avoid failure. It does, however, create a lot of noise generating instances. Note thatToTable
continues to exist becausetoTable
isn't allowed to fail, and when serializing to TOML syntax you can only serialize top-level tables. -
Extracted
Toml.FromValue.Matcher
andToml.FromValue.ParseTable
into their own modules. -
Add
pickKey
,liftMatcher
,inKey
,inIndex
,parseTableFromValue
toToml.FromValue
-
Replace
genericFromTable
withgenericParseTable
. The intended way to derive aFromValue
instance is now to write:instance FromValue T where fromValue = parseTableFromValue genericParseTable
- Add support for GHC 8.10.7 and 9.0.2
- Add Toml.FromValue.Generic and Toml.ToValue.Generic
- Add Alternative instance to Matcher and support multiple error messages in Result
- Add Data and Generic instances for Value
- Add ToTable and ToValue instances for Map
- Refine error messages
- More test coverage
- Complete rewrite including 1.0.0 compliance and pretty-printing.
- First version.