From 623b5b28fc886dad36e389f0828d125b603f3f12 Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Wed, 14 Aug 2024 14:11:17 +0300 Subject: [PATCH 1/2] [ upstream ] Make one error message to be produced faster --- src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr index c86098f12..b9fddff74 100644 --- a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr +++ b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr @@ -65,7 +65,7 @@ namespace NonObligatoryExts maybe e pure $ lookupType lhsName -- TODO to support `lhsName` to be a type parameter of type `Type` IPrimVal _ (PrT t) => pure $ typeInfoForPrimType t IType _ => pure typeInfoForTypeOfTypes - lhs => failAt (getFC lhs) "Only applications to a name is supported, given \{lhs}" + lhs => failAt (getFC lhs) "Only applications to a name is supported, given \{show lhs}" let Yes lengthCorrect = decEq ty.args.length args.length | No _ => failAt (getFC lhs) "INTERNAL ERROR: wrong count of unapp when analysing type application" _ <- ensureTyArgsNamed ty From 13f069440723d042b02110def7b04cf247661a99 Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Wed, 14 Aug 2024 20:21:07 +0300 Subject: [PATCH 2/2] [ derive ] Clean up repeating orders and log finally used ones --- src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr index b9fddff74..cbd40160a 100644 --- a/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr +++ b/src/Deriving/DepTyCheck/Gen/Core/ConsDerive.idr @@ -195,6 +195,10 @@ namespace NonObligatoryExts pure $ leftmost ++ leftToRightArgs ++ rightmost let allOrders = if simplificationHack then take 1 allOrders else allOrders + let allOrders = List.nub $ nub <$> allOrders + + for_ allOrders $ \order => + logPoint {level=10} "least-effort.order" [sig, con] "- one of used final orders: \{show order}" -------------------------- -- Producing the result --