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

SemType: replace Dimension to support assumed-size #244

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

raehik
Copy link
Collaborator

@raehik raehik commented Oct 12, 2022

The TArray constructor in SemType supports "fully-dynamic" arrays and "fully-static" ones, but not assumed-size arrays, which are a holdover from older Fortran standards where only the final dimension is dynamic. We replace the Dimension type synonym with a list-like data type in order to support them.

@raehik
Copy link
Collaborator Author

raehik commented Oct 12, 2022

@RaoulHC the type change should look something like this -- push and make whatever changes you want here (or make another PR), though most work will be in fortran-vars and other pkgs

The `TArray` constructor in `SemType` supports "fully-dynamic" arrays and
"fully-static" ones, but not assumed-size arrays, which are a holdover
from older Fortran standards where only the final dimension is dynamic.
We replace the `Dimension` type synonym with a list-like data type in
order to support them. Laziness (and thus performance) should be the same.
@raehik
Copy link
Collaborator Author

raehik commented Oct 18, 2022

Added a Dimensions -> Maybe [(Int, Int)] function for compatibility, and fixed laziness (matches lists now).

@raehik raehik merged commit 50636ba into master Oct 18, 2022
@raehik raehik deleted the semtype-array-star branch January 16, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants