-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to our own Type type for everything that's exposed in trustfall_…
…core (#435) * Move to our own Type type for everything that's exposed in trustfall_core * Switch to our own type implementation * add over max list depth panic * rename InlineModifiers to Modifiers * move from_type to associated function on type * move doc comment to struct instead of impl block * is_nullable() -> nullable() * rename previous is_nullable() usages * merge conflict fix * more is_nullable renames * add docs and doctests to new methods * cargo fmt fix * Update trustfall_core/src/ir/ty.rs Co-authored-by: Predrag Gruevski <[email protected]> * improve tests * add max list depth test with non-null on innermost * Move type-related code into `ir/types/` module and fix impl bug. * Add re-export for `Type` and `NamedTypeValue`. * Add early-return check for scalar-only subtyping. * Rename `base_named_type()` to `base_type()`. * Inline helpers and use `Type` reexport by default. * Return `Result` when parsing a string to a `Type`. * Rename `Type::new()` to `Type::parse()`. * Move type intersection onto `Type` itself. * Move `equal_ignoring_nullability()` method to `Type`. * Move value type-checking fn to a `Type` method. * Move orderability check to a method on `Type`. * Move scalar-only subtyping check into `Type` methods. * Rename `operations` module since it no longer contains any operations. * Add static type names for built-in types. * Minor polish. * Create statics for common types. * Add string capacity when printing. * Add more test coverage. --------- Co-authored-by: Predrag Gruevski <[email protected]> Co-authored-by: Predrag Gruevski <[email protected]>
- Loading branch information
1 parent
d99123e
commit 185deb3
Showing
14 changed files
with
1,066 additions
and
721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.