From 400226a1d12ca4c969c2cf1bf5145a7a357079f2 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Mon, 10 Apr 2023 15:19:55 +1000 Subject: [PATCH] Deprecate old TH functions according to plan --- CHANGELOG.md | 7 +++++++ Data/Profunctor/Product/TH.hs | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 380ef0c..17f211a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Unreleased (major) + +* `Data.Profunctor.Product.TH.makeAdaptorAndInstance` is deprecated in + favor of `makeAdaptorAndInstanceInferrable` +* `Data.Profunctor.Product.TH.makeAdaptorAndInstance'` is deprecated in + favor of `makeAdaptorAndInstanceInferrable'` + # 0.11.0.3 * Support GHC 9.2 diff --git a/Data/Profunctor/Product/TH.hs b/Data/Profunctor/Product/TH.hs index 66ec6a5..32b1265 100644 --- a/Data/Profunctor/Product/TH.hs +++ b/Data/Profunctor/Product/TH.hs @@ -148,15 +148,15 @@ makeAdaptorAndInstanceInferrable' = makeAdaptorAndInstanceI True Nothing -- | Use 'makeAdaptorAndInstanceInferrable' instead, because it --- generates instances with better inference properties. Will be --- deprecated in version 0.12. +-- generates instances with better inference properties. makeAdaptorAndInstance :: String -> TH.Name -> TH.Q [TH.Dec] makeAdaptorAndInstance adaptorNameS = makeAdaptorAndInstanceI False (Just adaptorNameS) +{-# DEPRECATED makeAdaptorAndInstance "Use makeAdaptorAndInstanceInferrable instead" #-} -- | Use 'makeAdaptorAndInstanceInferrable' instead, because it --- generates instances with better inference properties. Will be --- deprecated in version 0.12. +-- generates instances with better inference properties. makeAdaptorAndInstance' :: TH.Name -> TH.Q [TH.Dec] makeAdaptorAndInstance' = makeAdaptorAndInstanceI False Nothing +{-# DEPRECATED makeAdaptorAndInstance' "Use makeAdaptorAndInstanceInferrable' instead" #-}