1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Move the Taggable instances for Data.Syntax.Comment out.

This commit is contained in:
Rob Rix 2019-09-18 11:39:11 -04:00
parent d35321cb70
commit 211e2754d0
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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