-
Notifications
You must be signed in to change notification settings - Fork 108
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
Do not error on any AppT in sqlMaybeSelectProcessRowDec #406
Conversation
src/Database/Esqueleto/Record.hs
Outdated
((ConT ((==) ''Maybe -> True)) `AppT` _inner) -> AppE (ConE 'Just) | ||
(ConT _) -> id | ||
(AppT _ _) -> id | ||
_ -> error $ show x |
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.
Do we want to keep the error
here? I feel like we may want to just have id
as the fallback case instead of erroring on unknown constructors
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.
I agree, done. only had the error in the first place to be more similar to pre-existing behavior.
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.
hell yeah! Let's make a patch version bump + changelog entry and I'll get this released + deprecate the Hackage versions.
No need to be this restrictive in deriveEsqueletoRecord For example, AppT ListT _ and AppT (ConT _) _ are both fine but would throw an error here before this change.
Tested on the work codebase, all good! Uploaded as 3.5.13.1 |
No need to be this restrictive in deriveEsqueletoRecord For example, AppT ListT _ and AppT (ConT _) _ are both fine but would throw an error here before this change.
Before submitting your PR, check that you've:
@since
declarations to the Haddock.stylish-haskell
and otherwise adhered to the style guide.After submitting your PR: