From d2ea30be7396942d2b8101ee588fa601a512042b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Videla?= Date: Sun, 1 Dec 2024 15:52:26 -0500 Subject: [PATCH] Add Ord,Eq instance to WithFC --- libs/base/Language/Reflection/TT.idr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/base/Language/Reflection/TT.idr b/libs/base/Language/Reflection/TT.idr index a0c4c7c263..6440895458 100644 --- a/libs/base/Language/Reflection/TT.idr +++ b/libs/base/Language/Reflection/TT.idr @@ -93,6 +93,16 @@ export Traversable WithFC where traverse f (MkFCVal fc val) = map (MkFCVal fc) (f val) +||| Locations are not taken into account when comparing reflected trees +export +Eq a => Eq (WithFC a) where + x == y = x.value == y.value + +||| Locations are not taken into account when comparing reflected trees +export +Ord a => Ord (WithFC a) where + compare x y = compare x.value y.value + public export data NameType : Type where Bound : NameType