git.iko.soy/typeable/postgresql-simple
on master help sign in
Explain breaking change
commit577e20b2db0b7fa5b75fc9c33c43a5471c8acda9 authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 16 Oct 2018, 14:57 (8 years ago) parent404ab1a
1 file changed+19
CHANGES.md+19
CHANGES.md+19
@@ -2,6 +2,25 @@
22
33 * *Breaking change*: Use `Only` package's `Only for a common 1-tuple.
44
5+ Consider a downstream library depending already both on
6+ `Only` and `postgresql-simple` package. This library my define
7+ a `MyClass` with instances for `Only.Only` and `PostgreSQL.Only`.
8+ As now these types are the same, a library would break.
9+ Therefore I consider "merging" types a breaking change.
10+
11+ There are two ways for adopting this change in that scenario:
12+
13+ - Either CPP-guard `PostgreSQL.Only` instance with
14+
15+ ```haskell
16+ #if !MIN_VERSION_postgresql_simple(0,6,0)
17+ instance MyClass (PostgreSQL.Only a) where ...
18+ #endif
19+ ```
20+
21+ - or simply remove it and add `postgresql-simple >=0.6` lower bound,
22+ making sure that there's only single `Only`.
23+
524 * Add `ToField` instances for case-insensitive strict and lazy text.
625 Thanks to Max Tagher for the implementation.
726 https://github.com/lpsmith/postgresql-simple/pull/232