Skip to content

feat!: hierarchical module names#385

Merged
mergify[bot] merged 1 commit intomainfrom
brprice/modules-hierarchy
Apr 25, 2022
Merged

feat!: hierarchical module names#385
mergify[bot] merged 1 commit intomainfrom
brprice/modules-hierarchy

Conversation

@brprice
Copy link
Copy Markdown
Contributor

@brprice brprice commented Apr 13, 2022

A ModuleName is now a non-empty list, so one can have nested namespaces.

BREAKING CHANGE: this change requires a database migration, as it changes the representation of Prog. However, since this is just serialised to json and stored as a blob in the DB, it requires no schema changes. Since we have no programs we need to preserve, we decided not to bother with a migration. This means that DBs created before this commit will not load with a primer containing this commit.

@brprice brprice requested a review from a team April 13, 2022 16:36
@brprice brprice changed the base branch from brprice/module-names to brprice/module-rename April 13, 2022 16:36
@brprice brprice force-pushed the brprice/modules-hierarchy branch from c566692 to 8519d2e Compare April 13, 2022 16:38
@brprice
Copy link
Copy Markdown
Contributor Author

brprice commented Apr 14, 2022

This first commit just changes the types to allow for the possibility of hierarchical module names, but does not actually take advantage of that fact. (For instance, we may want to split up the primitive module into Primitives.Int and Primitives.Char etc -- as we currently have two equality functions with awkward names.) However, since we are not sure whether we actually want a hierarchy, I'll pause work on this for now.

This was referenced Apr 14, 2022
@brprice brprice force-pushed the brprice/module-rename branch 2 times, most recently from dd0a135 to 6938d0d Compare April 19, 2022 19:25
@brprice brprice force-pushed the brprice/modules-hierarchy branch from 8519d2e to 9232f8b Compare April 19, 2022 19:45
@brprice brprice force-pushed the brprice/module-rename branch from 76ea118 to 7996963 Compare April 19, 2022 19:50
@brprice brprice force-pushed the brprice/modules-hierarchy branch from 9232f8b to d587bbe Compare April 19, 2022 19:54
Comment thread primer/test/Tests/Action/Prog.hs
@brprice brprice linked an issue Apr 21, 2022 that may be closed by this pull request
@brprice brprice force-pushed the brprice/module-rename branch from e8cdbfc to 6d15e60 Compare April 25, 2022 16:18
A `ModuleName` is now a non-empty list, so one can have nested namespaces.

BREAKING CHANGE: this change requires a database migration, as it
changes the representation of `Prog`. However, since this is just
serialised to json and stored as a blob in the DB, it requires no schema
changes. Since we have no programs we need to preserve, we decided not
to bother with a migration. This means that DBs created before this
commit will not load with a primer containing this commit.
@brprice brprice force-pushed the brprice/modules-hierarchy branch from d587bbe to 78c6331 Compare April 25, 2022 16:31
@brprice brprice added the Ready to merge Ready to merge label Apr 25, 2022
Base automatically changed from brprice/module-rename to main April 25, 2022 16:56
@mergify mergify Bot merged commit d40703a into main Apr 25, 2022
@mergify mergify Bot deleted the brprice/modules-hierarchy branch April 25, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add identifiers to modules

2 participants