From 1e24c308af55b0f01bb33af2334e74faba337918 Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Sat, 28 Jun 2025 14:01:04 +0000 Subject: [PATCH 1/2] copilot-core: Remove deprecated fields of Copilot.Core.Expr.UExpr. Refs #636. The record fields uExprExpr and uExprType, part of Copilot.Core.Expr, are never really used within the module or in any other part of Copilot or, as far as we know, by any user of Copilot. The record fields were deprecated in Copilot 4.2 and no messages have been received requesting that they be kept in this library. As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, these definitions can now be removed. This commit removes the fields uExprType and uExprExpr from the definition of Copilot.Core.Expr.UExpr, making the type no longer a record. --- copilot-core/src/Copilot/Core/Expr.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/copilot-core/src/Copilot/Core/Expr.hs b/copilot-core/src/Copilot/Core/Expr.hs index 277e919d1..b65126a04 100644 --- a/copilot-core/src/Copilot/Core/Expr.hs +++ b/copilot-core/src/Copilot/Core/Expr.hs @@ -67,8 +67,4 @@ data Expr a where -- | A untyped expression that carries the information about the type of the -- expression as a value, as opposed to exposing it at type level (using an -- existential). -data UExpr = forall a . Typeable a => UExpr - { uExprType :: Type a - , uExprExpr :: Expr a - } -{-# DEPRECATED uExprType, uExprExpr "These fields are deprecated in Copilot 4.2. Use pattern matching instead." #-} +data UExpr = forall a . Typeable a => UExpr (Type a) (Expr a) From 2f4cc73a5f6db04fdd3bbabca6e52d35d011836e Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Sat, 28 Jun 2025 14:05:52 +0000 Subject: [PATCH 2/2] copilot-core: Document changes in CHANGELOG. Refs #636. --- copilot-core/CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copilot-core/CHANGELOG b/copilot-core/CHANGELOG index 4a0902c21..edd45681e 100644 --- a/copilot-core/CHANGELOG +++ b/copilot-core/CHANGELOG @@ -1,3 +1,6 @@ +2025-06-28 + * Remove deprecated fields of Copilot.Core.Expr.UExpr. (#636) + 2025-05-07 * Version bump (4.4). (#618) * Remove deprecated Copilot.Core.Type.uTypeType. (#615)