View Source Changelog
All notable changes to this project will be documented in this file.
[v0.3.3] - 2022-11-22
- The optional dependencies was also specified as test and dev only, which is not what we want. We want them optional, but all environments.
[v0.3.2] - 2022-11-22
- Issue #19. Could not compile when the dependant project did not have Ecto included, which was a bug.
[v0.3.1] - 2022-11-21
- Added type and typespecs for builtin types.
- Added additional documentation in
[v0.3.0] - 2022-11-21
- Mostly automatic support
Ecto.Type(including for builtin interval types)
right/1to extract the left and right values from the interval.
jason_encoderfor including encoder. Defaults to
Interval.to_map/1to convert an Interval struct to a map suitible for JSON and similar serialization.
discreteis now optional, and defaults to
[v0.2.0] - 2022-10-27
- Allow opting out of built in implementations by configuring
:interval, Interval.Float: false
Interval.Intervalableprotocol, which allows you to define what interval implementation to use for value types. This is purely for ergonomic reasons.
- Special-case for empty intervals, which doesn't require implementation-specific behaviour.
RuntimeErrors handling bad input to a function has been converted to
Interval.new/1now requires a
:moduleoption of the specific implementation to use, however the implementation has a
new/1that infers this when creating new intervals.
- The idea of a "zero" point was removed because it doesn't make sense for all intervals.
- Removed the
Interval.Pointprotocol in favor of a behaviour for the entire interval.
[v0.1.3] - 2022-10-12
- Added parameterized typespec
- The internal
Endpointstruct has been replaced by a simple 2-tuple.
- Empty intervals are now represented by two identical exclusive points.
- Fixed a bug in
Interval.union/2that causes incorrect bounds in some cases.
[v0.1.2] - 2022-10-10
- Fixed a correctness bug in intersection, where intersections between intervals containing unbounded endpoints would be incorrectly computed.