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

Inconsistent type reported by Meta for [] #8255

Closed
radeusgd opened this issue Nov 8, 2023 · 5 comments · Fixed by #8448
Closed

Inconsistent type reported by Meta for [] #8255

radeusgd opened this issue Nov 8, 2023 · 5 comments · Fixed by #8448
Assignees
Labels
-compiler -type-system Category: type system and type inference p-lowest Should be completed at some point

Comments

@radeusgd
Copy link
Member

radeusgd commented Nov 8, 2023

As raised on Discord, we can see that there is inconsistency between the types reported by various Meta methods for the value [] (and any other vector for that matter):

Actual behaviour

> Meta.get_qualified_type_name []
>>> Standard.Base.Data.Vector.Vector
> Meta.get_simple_type_name []
>>> Array
> Meta.get_qualified_type_name [].to_array
>>> Standard.Base.Data.Array.Array
> Meta.get_simple_type_name [].to_array
>>> Array

We can see that the Vector type is still characterized as Array by the get_simple_type_name. It seems like both methods should be consistent - so I assume that we most likely want:

Expected behaviour

> Meta.get_qualified_type_name []
>>> Standard.Base.Data.Vector.Vector
> Meta.get_simple_type_name []
>>> Vector
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Nov 8, 2023
@radeusgd radeusgd added p-lowest Should be completed at some point -type-system Category: type system and type inference -compiler labels Nov 8, 2023
@jdunkerley jdunkerley moved this from ❓New to 📤 Backlog in Issues Board Nov 14, 2023
@JaroslavTulach
Copy link
Member

The get_simple_type_name is (probably due to historical reasons) a completely different implementation that is not using the TypeOf...Node as the get_qualified_type_name does. Probably time to rewrite the simple version to delegate to fully qualified name and shorten it - where possible.

@JaroslavTulach JaroslavTulach moved this from 📤 Backlog to ⚙️ Design in Issues Board Dec 4, 2023
@enso-bot
Copy link

enso-bot bot commented Dec 4, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-12-03):

Progress: - analyzing "type names": #8255

Next Day: Bugfix "type names"

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

@JaroslavTulach JaroslavTulach moved this from ⚙️ Design to 🔧 Implementation in Issues Board Dec 4, 2023
@enso-bot
Copy link

enso-bot bot commented Dec 5, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-12-04):

Progress: - Meta.get_simple_type_name

Next Day: Bugfix "type names"

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

@JaroslavTulach JaroslavTulach moved this from 🔧 Implementation to 👁️ Code review in Issues Board Dec 5, 2023
@enso-bot
Copy link

enso-bot bot commented Dec 6, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-12-05):

Progress: - AoC: https://discord.com/channels/401396655599124480/1181479168400171098/1181516808495312896

Next Day: Bugfix something

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

@mergify mergify bot closed this as completed in #8448 Dec 6, 2023
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Dec 6, 2023
mergify bot pushed a commit that referenced this issue Dec 6, 2023
Fixes #8255 by unifying `get_qualified_type_name` and `get_simple_type_name` implementations.
@enso-bot
Copy link

enso-bot bot commented Dec 7, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-12-06):

Progress: - merged: #8448

Next Day: Bugfix something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler -type-system Category: type system and type inference p-lowest Should be completed at some point
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants