Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix labels for list-types in $SetReplaceTypeGraph #625

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

maxitg
Copy link
Owner

@maxitg maxitg commented Mar 17, 2021

Changes

  • Labels for types that are lists (e.g., {MultisetSubstitutionSystem, 0}) don't currently show correctly due to Graph interpreting MultisetSubstitutionSystem and 0 as separate labels and plotting them on top of each other.
  • This PR fixes that by converting labels to strings.

Examples

  • Declare a type:
SetReplace`PackageScope`declareTypeTranslation[Identity, {String, 0}, {Integer, 0}];
Unprotect[$SetReplaceTypes];
Unprotect[$SetReplaceProperties];
Unprotect[$SetReplaceTypeGraph];
SetReplace`PackageScope`initializeTypeSystem[];
  • Show a type graph which is now rendered correctly:
In[] := $SetReplaceTypeGraph

image


This change is Reviewable

@maxitg maxitg added the weed Something isn't working label Mar 17, 2021
@maxitg maxitg added this to the Project Yellowstone milestone Mar 17, 2021
@maxitg maxitg requested a review from daneelsan March 17, 2021 19:23
Copy link
Collaborator

@daneelsan daneelsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @daneelsan)

@maxitg maxitg merged commit daaa3c7 into master Mar 17, 2021
@maxitg maxitg deleted the fix/typeGraphListLabels branch March 17, 2021 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
weed Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants