From c5369198f8ee95991fb8ead9355a70f514ea23d5 Mon Sep 17 00:00:00 2001 From: Jan Mas Rovira Date: Wed, 4 Dec 2024 10:36:40 +0100 Subject: [PATCH] remove duplicates --- src/Juvix/Compiler/Concrete/Data/Highlight.hs | 2 +- src/Juvix/Emacs/Properties.hs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Juvix/Compiler/Concrete/Data/Highlight.hs b/src/Juvix/Compiler/Concrete/Data/Highlight.hs index 127b769ef3..4efe6443d0 100644 --- a/src/Juvix/Compiler/Concrete/Data/Highlight.hs +++ b/src/Juvix/Compiler/Concrete/Data/Highlight.hs @@ -44,7 +44,7 @@ buildProperties HighlightInput {..} = <> mapMaybe goFaceName _highlightNames <> map goFaceError _highlightErrors, _propertiesGoto = map goGotoProperty _highlightNames, - _propertiesTopDef = mapMaybe goDefProperty _highlightNames, + _propertiesTopDef = nubHashable (mapMaybe goDefProperty _highlightNames), _propertiesInfo = mapMaybe (goDocProperty _highlightDocTable _highlightTypes) _highlightNames } diff --git a/src/Juvix/Emacs/Properties.hs b/src/Juvix/Emacs/Properties.hs index f6742b66dc..def72d211f 100644 --- a/src/Juvix/Emacs/Properties.hs +++ b/src/Juvix/Emacs/Properties.hs @@ -92,6 +92,9 @@ data PropertyGoto = PropertyGoto newtype PropertyTopDef = PropertyTopDef { _topDef :: Text } + deriving stock (Eq, Generic) + +instance Hashable PropertyTopDef newtype PropertyFace = PropertyFace { _faceFace :: Face