Open
Conversation
exaexa
reviewed
Oct 25, 2025
Collaborator
exaexa
left a comment
There was a problem hiding this comment.
Hi @taqenoqo, this looks IMO OK to go in as is; some minor questions:
- adding the extra constructor on Migration makes the lambdas that match e.g.
Migration _ to _spew a warning (example below), is there some nice way to squelch that? I see the other possibility essentially cannot get there but it's still a warning. - eventually, we would also have drop-table migrations?
Warning ex.:
...
src/Database/Selda/Migrations.hs:131:22: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a lambda abstraction:
Patterns of type ‘Migration backend’ not matched:
MigrationCreateTable _
|
131 | diffs <- mapM (\(Migration from _ _) -> diffTable from) ms'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Database/Selda/Migrations.hs:137:9: warning: [GHC-62161] [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In an equation for ‘replaceIfSameTo’:
Patterns of type ‘Migration backend’ not matched:
MigrationCreateTable _
|
137 | replaceIfSameTo m@(Migration _ to _) =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far, only the following migration steps have been possible:
This pull request makes it possible to write the following flexible steps: