-
Notifications
You must be signed in to change notification settings - Fork 323
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
Improving widgets for take/drop #6641
Conversation
945da8f
to
139cc29
Compare
139cc29
to
607a455
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a justification for the changes in Meta
? I don't see it in PR description and the referenced issue seems too broad.
cons = case meta_typ of | ||
Meta.Type.Value _ -> meta_typ.constructors | ||
_ -> Test.fail "Should be a Meta.Type.Value: " + meta_typ.to_text | ||
|
||
cons.length . should_equal 1 | ||
cons.at 0 . should_be_a Meta.Constructor | ||
cons . map (x -> x.name) . sort . should_equal [ "Value" ] | ||
cons.each ctor-> | ||
ctor.parent_type . should_equal meta_typ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it should be called parent_type
? "Parent" is meant for other things: I can say: Any
is parent type of Text
and other types as well. Or Number
is parent type of Integer
. But constructor doesn't have a "parent type".
Java is using declaring class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can rename to declaring_type
. Does that sound OK?
...me/src/main/java/org/enso/interpreter/node/expression/builtin/meta/GetShortTypeNameNode.java
Show resolved
Hide resolved
Fair point, I updated the PR description. The justification is:
|
607a455
to
bd90f76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Couple of little things.
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Index_Sub_Range.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Index_Sub_Range.enso
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Couple of little things.
aa7a849
to
af10b38
Compare
Is |
…z-6260 * develop: Build nightlies every day. (#6681) Force `newDashboard` default on the CI-built packages. (#6680) Verify ascribed types of parameters really exist (#6584) SuggestionBuilder needs to send ascribedType of constructor parameters (#6655) Improvements to the Table visualization. (#6653) Removing flush (#6670) Improving widgets for take/drop (#6641)
Indeed, the latter. I guess that #6682 will be the general solution to this. Although this particular solution actually creates a more helpful message (partially using Perhaps it can be an inspiration for the typechecker as well - it may indeed be very good for UX to detect situations when an unapplied constructor of the correct type is passed and instead of issuing a type error, issuing an error telling the user they are missing some arguments. Do you think we can do it in #6682? I assume it would "just" require adding a special case to the error reporting logic that checks if the unexpected element is a constructor of an expected type and reporting a slightly different error then. |
* develop: Build nightlies every day. (#6681) Force `newDashboard` default on the CI-built packages. (#6680) Verify ascribed types of parameters really exist (#6584) SuggestionBuilder needs to send ascribedType of constructor parameters (#6655) Improvements to the Table visualization. (#6653) Removing flush (#6670) Improving widgets for take/drop (#6641) disable authentication and newDashboard by default (#6664) Add COOP+COEP+CORP headers (#6646)
Pull Request Description
Related to #6410
Important Notes
Meta
methods (needed for error handling):Meta.Type
now hasname
andqualified_name
.Meta.Constructor
hasdeclaring_type
allowing to get the type that this constructor is associated with.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.