mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
Revert "Move the Taggable instances for Data.Syntax.Comment out."
This reverts commit 211e2754d0
.
This commit is contained in:
parent
9e20ab8fc4
commit
efa83c3036
@ -8,11 +8,10 @@ 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, Taggable, ToJSONFields1, NFData1)
|
||||
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, NFData1)
|
||||
deriving (Eq1, Show1, Ord1) via Generically Comment
|
||||
|
||||
instance Evaluatable Comment where
|
||||
@ -28,7 +27,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, Taggable, ToJSONFields1, NFData1)
|
||||
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, NFData1)
|
||||
deriving (Eq1, Show1, Ord1) via Generically HashBang
|
||||
|
||||
-- TODO: Implement Eval instance for HashBang
|
||||
|
@ -38,6 +38,7 @@ 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
|
||||
@ -182,6 +183,8 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user