diff --git a/semantic-go/src/Language/Go/Tags.hs b/semantic-go/src/Language/Go/Tags.hs index fdb666ade..19e9852e1 100644 --- a/semantic-go/src/Language/Go/Tags.hs +++ b/semantic-go/src/Language/Go/Tags.hs @@ -19,7 +19,6 @@ module Language.Go.Tags import AST.Element import Control.Effect.Reader import Control.Effect.Writer -import Data.Monoid (Ap (..)) import Data.Text as Text import GHC.Generics import Source.Loc @@ -96,7 +95,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags diff --git a/semantic-java/src/Language/Java/Tags.hs b/semantic-java/src/Language/Java/Tags.hs index d41966397..01ba7226e 100644 --- a/semantic-java/src/Language/Java/Tags.hs +++ b/semantic-java/src/Language/Java/Tags.hs @@ -5,7 +5,6 @@ module Language.Java.Tags import Control.Effect.Reader import Control.Effect.Writer -import Data.Monoid (Ap(..)) import GHC.Generics import Source.Loc import Source.Range @@ -94,7 +93,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags diff --git a/semantic-python/src/Language/Python/Tags.hs b/semantic-python/src/Language/Python/Tags.hs index b6c38f449..497de30f3 100644 --- a/semantic-python/src/Language/Python/Tags.hs +++ b/semantic-python/src/Language/Python/Tags.hs @@ -20,7 +20,6 @@ import AST.Element import Control.Effect.Reader import Control.Effect.Writer import Data.Maybe (listToMaybe) -import Data.Monoid (Ap(..)) import Data.List.NonEmpty (NonEmpty(..)) import Data.Text as Text import GHC.Generics @@ -166,7 +165,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags diff --git a/semantic-ruby/src/Language/Ruby/Tags.hs b/semantic-ruby/src/Language/Ruby/Tags.hs index f336112fe..4c4f84ae9 100644 --- a/semantic-ruby/src/Language/Ruby/Tags.hs +++ b/semantic-ruby/src/Language/Ruby/Tags.hs @@ -22,7 +22,6 @@ import Control.Effect.Reader import Control.Effect.State import Control.Effect.Writer import Control.Monad -import Data.Monoid (Ap (..)) import Data.Foldable import Data.Text as Text import GHC.Generics @@ -311,7 +310,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags diff --git a/semantic-tsx/src/Language/TSX/Tags.hs b/semantic-tsx/src/Language/TSX/Tags.hs index 05bfcb32e..159092838 100644 --- a/semantic-tsx/src/Language/TSX/Tags.hs +++ b/semantic-tsx/src/Language/TSX/Tags.hs @@ -21,7 +21,6 @@ import AST.Element import Control.Effect.Reader import Control.Effect.Writer import Data.Foldable -import Data.Monoid (Ap (..)) import Data.Text as Text import GHC.Generics import Source.Loc @@ -137,7 +136,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags diff --git a/semantic-typescript/src/Language/TypeScript/Tags.hs b/semantic-typescript/src/Language/TypeScript/Tags.hs index 43f5f24e9..c810d04cd 100644 --- a/semantic-typescript/src/Language/TypeScript/Tags.hs +++ b/semantic-typescript/src/Language/TypeScript/Tags.hs @@ -21,7 +21,6 @@ import AST.Element import Control.Effect.Reader import Control.Effect.Writer import Data.Foldable -import Data.Monoid (Ap (..)) import Data.Text as Text import GHC.Generics import Source.Loc @@ -129,7 +128,7 @@ gtags ) => t Loc -> m () -gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics +gtags = Tags.traverse1_ @ToTags (const (pure ())) tags . Tags.Generics instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = gtags