... | ... | @@ -179,4 +179,25 @@ To fix the warnings, simply remove the uses of `..`, as neither use is necessary |
|
|
|
|
|
## Library changes
|
|
|
|
|
|
TODO |
|
|
\ No newline at end of file |
|
|
### `template-haskell-2.16.0.0`
|
|
|
|
|
|
#### `Lift` changes
|
|
|
|
|
|
The `Lift` class features a new method `liftTyped :: t -> Q (TExp t)`. To facilitate making it easier to define implementations of `lift` in terms of `liftTyped`, the default implementation of `lift` has been changed. Before, the default implementation used the `Data` type class:
|
|
|
|
|
|
```haskell
|
|
|
default lift :: Data t => t -> Q Exp
|
|
|
lift = liftData
|
|
|
```
|
|
|
|
|
|
The new default implementation is in terms of `liftTyped`:
|
|
|
|
|
|
```haskell
|
|
|
default lift :: (r ~ 'LiftedRep) => t -> Q Exp
|
|
|
lift = unTypeQ . liftTyped
|
|
|
```
|
|
|
|
|
|
This will affect any `Lift` instance that does not explicitly define `lift`. There are two ways to adapt to this change:
|
|
|
|
|
|
1. Derive the `Lift` instance using the `DeriveLift` extension, which has been available since GHC 8.0.
|
|
|
2. Explicitly define `liftTyped`, guarding it with `#if MIN_VERSION_template_haskell(2,16,0) ... #endif` if you want to preserve backwards compatibility with older versions of `template-haskell`. |
|
|
\ No newline at end of file |