| 1 |
0.14.2 [2024.05.12] |
| 2 |
------------------- |
| 3 |
* Re-export `Log2` from `Data.Constraint.Nat`. |
| 4 |
* Add `log2Nat` and `log2Pow` to `Data.Constraint.Nat`. |
| 5 |
|
| 6 |
0.14.1 [2024.04.29] |
| 7 |
------------------- |
| 8 |
* Remove an unused dependency on the `type-equality` library. |
| 9 |
|
| 10 |
0.14 [2023.10.11] |
| 11 |
----------------- |
| 12 |
* Drop support for GHCs older than 8.6. |
| 13 |
* The `forall` function in `Data.Constraint.Forall` has been renamed to |
| 14 |
`forall_`, since a future version of GHC will make the use of `forall` as |
| 15 |
an identifier an error. |
| 16 |
* Implement `Data.Constraint.Forall` using `QuantifiedConstraints`. |
| 17 |
* Remove `Lifting` instances for `ErrorT` and `ListT`, which were removed |
| 18 |
in `transformers-0.6.*`. |
| 19 |
* Add a `c => Boring (Dict c)` instance. |
| 20 |
* Add the `Data.Constraint.Char` module, which contains utilities for working |
| 21 |
with `KnownChar` constraints. This module is only available on GHC 9.2 or |
| 22 |
later. |
| 23 |
* Add `unsafeAxiom` to `Data.Constraint.Unsafe`. |
| 24 |
* Add `unsafeSChar`, `unsafeSNat`, and `unsafeSSymbol` to |
| 25 |
`Data.Constraint.Unsafe` when building with `base-4.18` (GHC 9.6) or later. |
| 26 |
|
| 27 |
0.13.4 [2022.05.19] |
| 28 |
------------------- |
| 29 |
* Correct the CPP introduced in `constraints-0.13.3` such that it works when |
| 30 |
building with `mtl-2.3.*` or later combined with `transformers < 0.6`. |
| 31 |
|
| 32 |
0.13.3 [2022.01.31] |
| 33 |
------------------- |
| 34 |
* Allow building with `transformers-0.6.*` and `mtl-2.3.*`. |
| 35 |
|
| 36 |
0.13.2 [2021.11.10] |
| 37 |
------------------- |
| 38 |
* Allow building on GHC HEAD. |
| 39 |
|
| 40 |
0.13.1 [2021.10.31] |
| 41 |
------------------- |
| 42 |
* Allow building with GHC 9.2. |
| 43 |
|
| 44 |
0.13 [2021.02.17] |
| 45 |
----------------- |
| 46 |
* `Data.Constraint.Symbol` now reexports the `GHC.TypeLits.AppendSymbol` type |
| 47 |
family from recent versions of `base` (or, on old versions of `base`, it |
| 48 |
defines a backwards-compatibile version of `AppendSymbol`). The existing |
| 49 |
`(++)` type family for `Data.Constraint.Symbol` is now a synonym for |
| 50 |
`AppendSymbol`. |
| 51 |
|
| 52 |
This is technically a breaking change, as `(++)` was previously defined like |
| 53 |
so: |
| 54 |
|
| 55 |
```hs |
| 56 |
type family (++) :: Symbol -> Symbol -> Symbol |
| 57 |
``` |
| 58 |
|
| 59 |
This meant that `(++)` could be partially applied. However, for compatibility |
| 60 |
with the way that `AppendSymbol` is defined, `(++)` is now defined like so: |
| 61 |
|
| 62 |
```hs |
| 63 |
type m ++ n = AppendSymbol m n |
| 64 |
``` |
| 65 |
|
| 66 |
As a result, `(++)` can no longer be partially applied. |
| 67 |
* Make the `(++)` type family in `Data.Constraint.Symbol` be `infixr 5`. |
| 68 |
* Add `implied :: (a => b) -> (a :- b)` to `Data.Constraint`, which converts |
| 69 |
a quantified constraint into an entailment. This is only available when |
| 70 |
compiled with GHC 8.6 or later. |
| 71 |
|
| 72 |
0.12 [2020.02.03] |
| 73 |
----------------- |
| 74 |
* Relax the type signature for `divideTimes`: |
| 75 |
|
| 76 |
```diff |
| 77 |
-dividesTimes :: (Divides a b, Divides a c) :- Divides a (b * c) |
| 78 |
+dividesTimes :: Divides a b :- Divides a (b * c) |
| 79 |
``` |
| 80 |
|
| 81 |
* Simplify the type signature of `dividesDef`: |
| 82 |
|
| 83 |
```diff |
| 84 |
-dividesDef :: forall a b. Divides a b :- ((a * Div b a) ~ b) |
| 85 |
+dividesDef :: forall a b. Divides a b :- (Mod b a ~ 0) |
| 86 |
``` |
| 87 |
|
| 88 |
The original type of `diviesDef` can be (partially) recovered by defining |
| 89 |
it in terms of the new `dividesDef`: |
| 90 |
|
| 91 |
```hs |
| 92 |
dividesDef' :: forall a b. (1 <= a, Divides a b) :- ((a * Div b a) ~ b) |
| 93 |
dividesDef' = Sub $ case (dividesDef @a @b, euclideanNat @a @b) of |
| 94 |
(Sub Dict, Sub Dict) -> Dict |
| 95 |
``` |
| 96 |
|
| 97 |
0.11.2 [2019.09.06] |
| 98 |
------------------- |
| 99 |
* Depend on the `type-equality` compatibility library so that `(:~~:)` may be |
| 100 |
used when compiling this library with GHC 8.0. This avoids having to redefine |
| 101 |
`(:~~:)` directly in the internals of `constraints` itself. |
| 102 |
|
| 103 |
0.11.1 [2019.08.27] |
| 104 |
------------------- |
| 105 |
* Make `Data.Constraint.Deferrable.UnsatisfiedConstraint` a newtype. |
| 106 |
|
| 107 |
0.11 [2019.05.10] |
| 108 |
----------------- |
| 109 |
* Introduce a `HasDict` type class for types that witness evidence of |
| 110 |
constraints, such as `Dict`, `(:-)`, `Coercion`, `(:~:)`, `(:~~:)`, and |
| 111 |
`TypeRep`. |
| 112 |
* Generalize the types of `withDict` and `(\\)` to be polymorphic over |
| 113 |
any `HasDict` instance. |
| 114 |
* Add `type (⊢) = (:-)`. |
| 115 |
* Fix unsafe mistakes in the statements of `dividesDef` and `timesDiv` in |
| 116 |
`Data.Constraint.Nat`. |
| 117 |
* Make the implementations of `Min` and `Max` reduce on more inputs in |
| 118 |
`Data.Constraint.Nat`. |
| 119 |
* Add `minusNat` and `minusZero` functions to `Data.Constraint.Nat`. |
| 120 |
* Support `hashable-1.3.*` and `semigroups-0.19.*`. |
| 121 |
|
| 122 |
0.10.1 [2018.07.02] |
| 123 |
------------------- |
| 124 |
* Allow building with GHC 8.6. |
| 125 |
* Add three axioms about `(+)` and `(-)` to `Data.Constraint.Nat`. |
| 126 |
|
| 127 |
0.10 |
| 128 |
---- |
| 129 |
* Adapt to the `Semigroup`–`Monoid` Proposal (introduced in `base-4.11`): |
| 130 |
* Add a `Semigroup` instance for `Dict` |
| 131 |
* Add the appropriate `(:=>)` instances involving `Semigroup`, and change the |
| 132 |
`Class () (Monoid a)` instance to `Class (Semigroup a) (Monoid a)` when |
| 133 |
`base` is recent enough |
| 134 |
* Add the appropriate `Lifting(2)` instances involving `Semigroup` |
| 135 |
* `Data.Constraint.Nat` now reexports the `Div` and `Mod` type families from |
| 136 |
`GHC.TypeLits` on `base-4.11` or later |
| 137 |
* Fix the type signature of `maxCommutes` |
| 138 |
* Export the `no` method of `Bottom` |
| 139 |
* Add `NFData` instances for `Dict` and `(:-)` |
| 140 |
|
| 141 |
0.9.1 |
| 142 |
----- |
| 143 |
* Correct an improper use of `unsafeCoerce` in the internals of |
| 144 |
`Data.Constraint.Nat` and `Data.Constraint.Symbol` |
| 145 |
* Correctly identify the mismatched types when you defer an unsatisfiable |
| 146 |
equality constraint through `Data.Constraint.Deferrable` |
| 147 |
* Re-export the `(:~~:)` defined in `base` from `Data.Constraint.Deferred` with |
| 148 |
GHC 8.2 or later |
| 149 |
* Add several new `(:=>)` instances for `Bits`, `Identity`, `Const`, `Natural`, |
| 150 |
`IO`, and `Word`. |
| 151 |
* Modernize some existing `Class` and `(:=>)` instances to reflect the fact |
| 152 |
that `Applicative` is now a superclass of `Monad` on recent versions of |
| 153 |
`base`. |
| 154 |
|
| 155 |
0.9 |
| 156 |
--- |
| 157 |
* Changes to `Data.Constraint`: |
| 158 |
* Add `strengthen1` and `strengthen2` |
| 159 |
* Changes to `Data.Constraint.Deferrable`: |
| 160 |
* Add a `Deferrable ()` instance |
| 161 |
* The `Deferrable (a ~ b)` instance now shows the `TypeRep`s of `a` and `b` |
| 162 |
when a type mismatch error is thrown |
| 163 |
* Add `defer_` and `deferEither_`, counterparts to `defer` and `deferEither` |
| 164 |
which do not require proxy arguments |
| 165 |
* Enable `PolyKinds`. This allows the `Deferrable (a ~ b)` instance to be |
| 166 |
polykinded on all supported versions of GHC _except_ 7.10, where the kinds |
| 167 |
must be `*` due to an old GHC bug |
| 168 |
* Introduce a heterogeneous equality type `(:~~:)`, and use it to define a |
| 169 |
`Deferrable (a ~~ b)` instance on GHC 8.0 or later |
| 170 |
* Changes to `Data.Constraint.Forall`: |
| 171 |
* Implement `ForallF` and `ForallT` in terms of `Forall` |
| 172 |
* Add `ForallV` and `InstV` (supporting a variable number of parameters) |
| 173 |
* Add a `forall` combinator |
| 174 |
* Introduce `Data.Constraint.Nat` and `Data.Constraint.Symbol`, which contain |
| 175 |
utilities for working with `KnownNat` and `KnownSymbol` constraints, |
| 176 |
respectively. These modules are only available on GHC 8.0 or later. |
| 177 |
|
| 178 |
0.8 |
| 179 |
----- |
| 180 |
* GHC 8 compatibility |
| 181 |
* `transformers` 0.5 compatibility |
| 182 |
* `binary` 0.8 compatibility |
| 183 |
* Dropped support for GHC 7.6 in favor of a nicer Bottom representation. |
| 184 |
|
| 185 |
0.7 |
| 186 |
--- |
| 187 |
* Found a nicer encoding of the initial object in the category of constraints using a [nullary constraint](https://ghc.haskell.org/trac/ghc/ticket/7642). |
| 188 |
|
| 189 |
0.6.1 |
| 190 |
----- |
| 191 |
* Remove the need for closed type families from the new `Forall`. |
| 192 |
|
| 193 |
0.6 |
| 194 |
--- |
| 195 |
* Completely redesigned `Data.Constraint.Forall`. The old design is unsound and can be abused to define `unsafeCoerce`! |
| 196 |
The new design requires closed type families, so this module now requires GHC 7.8+ |
| 197 |
|
| 198 |
0.5.1 |
| 199 |
----- |
| 200 |
* Added `Data.Constraint.Deferrable`. |
| 201 |
|
| 202 |
0.5 |
| 203 |
----- |
| 204 |
* Added `Data.Constraint.Lifting`. |
| 205 |
|
| 206 |
0.4.1.3 |
| 207 |
------- |
| 208 |
* Acknowledge we actually need at least base 4.5 |
| 209 |
|
| 210 |
0.4.1.2 |
| 211 |
------- |
| 212 |
* Restore support for building on older GHCs |
| 213 |
|
| 214 |
0.4.1.1 |
| 215 |
------- |
| 216 |
* Minor documentation fixes. |
| 217 |
|
| 218 |
0.4.1 |
| 219 |
----- |
| 220 |
* Added `mapDict` and `unmapDict`. |
| 221 |
* Added a lot of documentation. |
| 222 |
|
| 223 |
0.4 |
| 224 |
--- |
| 225 |
* `Typeable` and `Data`. The `Data` instance for `(:-)` is a conservative approximation that avoids having to turn (:-) into a cartesian closed category. |
| 226 |
If it becomes a pain point for users, I know how to do that, and have done so in other libraries -- see [hask](http://github.com/ekmett/hask), but I'm hesitant to bring such heavy machinery to bear and it isn't clear how to do it in a way that is compatible with those other libraries. |
| 227 |
|
| 228 |
0.3.5 |
| 229 |
----- |
| 230 |
* Explicit role annotations |
| 231 |
|
| 232 |
0.3.4.1 |
| 233 |
------- |
| 234 |
* Fixed build failures. |
| 235 |
* Fixed an unused import warning on older GHCs. |
| 236 |
|
| 237 |
0.3.4 |
| 238 |
----- |
| 239 |
* Added `bottom` |