Skip to content

Commit

Permalink
PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
turboladen committed Aug 28, 2024
1 parent 5ca6ff8 commit 09fc682
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 81 deletions.
31 changes: 27 additions & 4 deletions crates/api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,36 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- `crate::Annotation` now wraps `String`s inside `Term`s.
- New type: `crate::Annotation` now wraps `String`s inside `Term`s.
- New type: `crate::term::Builder`. Intended for internal use only, but had to make public to
use it in the `term!()` macro.
- New types: `crate::term::variants`:
- `AtomAnnotation`
- `AtomExponent`
- `AtomExponentAnnotation`
- `FactorAnnotation`
- `FactorAtom`
- `FactorAtomAnnotation`
- `FactorAtomExponent`
- `FactorAtomExponentAnnotation`
- `FactorExponent`
- `FactorExponentAnnotation`
- `FactorPrefixAtom`
- `FactorPrefixAtomAnnotation`
- `FactorPrefixAtomExponent`
- `FactorPrefixAtomExponentAnnotation`
- `PrefixAtom`
- `PrefixAtomAnnotation`
- `PrefixAtomExponent`
- `PrefixAtomExponentAnnotation`
- `Unit::simplify()`, extracted from the (redesigned) innards of `Unit::expression_reduced()`.
- Added `parse_unit!()` macro as a shortcut to `Unit::from_str(foo).unwrap()`.
- Added `assert_field_eq!()` macro to allow checking exact equality of objects (since current
implementation of `PartialEq` does not do this).
- Added two macros to allow checking exact equality of objects (since current
implementation of `PartialEq` does not do this):
- `assert_field_eq!()`
- `pretty_assert_field_eq!()`
- `Composition` now derives `Ord`.
- `Unit::simplify()`, extracted from the (redesigned) innards of `Unit::expression_reduced()`.
- Added `impl From<Factor> for Term` and `impl From<Atom> for Term`.

### Changed

Expand All @@ -28,6 +50,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- `Term::is_unity()` is now `const`.
- `impl Default for Term` now returns `term::UNITY` instead of a `Term` with 0 fields set.
- `term!()` can now take, for `annotation`, any `T: ToString`.
- The `term` module is now `pub`.
- `IsCompatibleWith` now has default implementation that compares the `Composition` of the LHS and
RHS types. As a result, `IsCompatibleWith` now also requires both sides `impl Composable`.
- (Internal) `AnnotationComposition` now uses `&str` instead of `String` when determining an
Expand Down
Loading

0 comments on commit 09fc682

Please sign in to comment.