Closed mrcjkb closed 11 months ago
Pre GHC-8 will fail. But maybe it's time to drop support for them...
Pre GHC-8 will fail. But maybe it's time to drop support for them...
Looks like the failure was because of a redundant pragma (left over from an earlier implementation). If it works pre GHC-8, I don't think this is a breaking change.
don't think this is a breaking change.
The proof obligation is on you. As maintainer I have to be conservative in unclear cases.
Please tell when you are reaedy for the review (i.e. stop force pushing).
Please tell when you are reaedy for the review (i.e. stop force pushing).
Sorry, I somehow missed the QueryError
instance.
It turns out cabal was only running the inspection
suite and printing "PASS"
for the tests
suite without actually running any tests when I ran it locally.
Marking as draft again, because I would like to add a test to prove that you can still catch the individual exceptions
This should be ready now.
Seems mostly OK. This is a breaking change, so i'll take my time thinking this through.
@phadej have you had time to think it through? Sorry for pinging... This PR has been open for a while and I wanted to make sure it hasn't been forgotten :)
I'm planning to do major postgresql-simple
release after
Then I can remove Eq Null
instance and include this. This is technically a breaking change (though hopefully not in practice), so I'll include it then.
Thanks for the info + review!
This adds a common superclass
SomePostgreSqlException
for all fourException
types:SqlError
FormatError
QueryError
ResultError
The benefit is that clients can call
fromException
to handle all postgresql-simple exceptions (seeisPostgreSqlException
intest/Exception.hs
), rather than being forced to handle allSomeException
s.Without
SomePostgreSqlException
, clients have to check whether a caughtSomeException
is one of the 4 postgresql-simple exceptions. This is error-prone, as the addition of a new type of exception to this library would go unnoticed.This change is backward-compatible.
Note: I ran stylish-haskell, but it formatted many files that I hadn't touched. So instead, I manually formatted my changes.