diff --git a/src/Data/Syntax/Comment.hs b/src/Data/Syntax/Comment.hs index f7f68307f..a0014b8fc 100644 --- a/src/Data/Syntax/Comment.hs +++ b/src/Data/Syntax/Comment.hs @@ -8,10 +8,11 @@ import Data.Abstract.Evaluatable import Data.JSON.Fields import Diffing.Algorithm import Reprinting.Tokenize as Token +import Tags.Taggable (Taggable) -- | An unnested comment (line or block). newtype Comment a = Comment { commentContent :: Text } - deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, NFData1) + deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, Taggable, ToJSONFields1, NFData1) deriving (Eq1, Show1, Ord1) via Generically Comment instance Evaluatable Comment where @@ -27,7 +28,7 @@ instance Tokenize Comment where -- | HashBang line (e.g. `#!/usr/bin/env node`) newtype HashBang a = HashBang { value :: Text } - deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, NFData1) + deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, Taggable, ToJSONFields1, NFData1) deriving (Eq1, Show1, Ord1) via Generically HashBang -- TODO: Implement Eval instance for HashBang diff --git a/src/Tags/Taggable.hs b/src/Tags/Taggable.hs index db458d430..30e1d3a93 100644 --- a/src/Tags/Taggable.hs +++ b/src/Tags/Taggable.hs @@ -38,7 +38,6 @@ import Data.Text hiding (empty) import Streaming hiding (Sum) import Streaming.Prelude (yield) -import qualified Data.Syntax.Comment as Comment import qualified Data.Syntax.Declaration as Declaration import qualified Data.Syntax.Directive as Directive import qualified Data.Syntax.Expression as Expression @@ -183,8 +182,6 @@ instance Taggable Ruby.Send where symbolName Ruby.Send{..} = declaredName =<< sendSelector instance Taggable [] -instance Taggable Comment.Comment -instance Taggable Comment.HashBang instance Taggable Expression.And instance Taggable Expression.Await