mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Define a Listable1 instance for Comment.
This commit is contained in:
parent
b0c79efa9b
commit
aae77f6e0e
@ -38,8 +38,9 @@ import Data.Record
|
||||
import Data.Semigroup
|
||||
import Data.Source
|
||||
import Data.Span
|
||||
import qualified Data.Syntax as Syntax (Empty(..), Identifier(..))
|
||||
import qualified Data.Syntax.Statement as Statement (If(..), Return(..))
|
||||
import qualified Data.Syntax as Syntax
|
||||
import qualified Data.Syntax.Comment as Comment
|
||||
import qualified Data.Syntax.Statement as Statement
|
||||
import Data.Text as T (Text, pack)
|
||||
import qualified Data.Text.Encoding as T
|
||||
import Data.These
|
||||
@ -296,6 +297,10 @@ instance (Listable1 f, Listable1 (Union (g ': fs))) => Listable1 (Union (f ': g
|
||||
instance Listable1 f => Listable1 (Union '[f]) where
|
||||
liftTiers tiers = inj `mapT` ((liftTiers :: [Tier a] -> [Tier (f a)]) tiers)
|
||||
|
||||
|
||||
instance Listable1 Comment.Comment where
|
||||
liftTiers _ = cons1 Comment.Comment
|
||||
|
||||
instance Listable1 Statement.If where
|
||||
liftTiers tiers = liftCons3 tiers tiers tiers Statement.If
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user