{-# LANGUAGE DataKinds, DeriveGeneric, DeriveTraversable, KindSignatures #-}
module TreeSitter.Token
( Token(..)
) where
import GHC.Generics (Generic, Generic1)
import GHC.TypeLits (Symbol, Nat)
newtype Token (symName :: Symbol) (symVal :: Nat) a = Token { Token symName symVal a -> a
ann :: a }
deriving (Token symName symVal a -> Token symName symVal a -> Bool
(Token symName symVal a -> Token symName symVal a -> Bool)
-> (Token symName symVal a -> Token symName symVal a -> Bool)
-> Eq (Token symName symVal a)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (symName :: Symbol) (symVal :: Nat) a.
Eq a =>
Token symName symVal a -> Token symName symVal a -> Bool
/= :: Token symName symVal a -> Token symName symVal a -> Bool
$c/= :: forall (symName :: Symbol) (symVal :: Nat) a.
Eq a =>
Token symName symVal a -> Token symName symVal a -> Bool
== :: Token symName symVal a -> Token symName symVal a -> Bool
$c== :: forall (symName :: Symbol) (symVal :: Nat) a.
Eq a =>
Token symName symVal a -> Token symName symVal a -> Bool
Eq, Token symName symVal a -> Bool
(a -> m) -> Token symName symVal a -> m
(a -> b -> b) -> b -> Token symName symVal a -> b
(forall m. Monoid m => Token symName symVal m -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> Token symName symVal a -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> Token symName symVal a -> m)
-> (forall a b. (a -> b -> b) -> b -> Token symName symVal a -> b)
-> (forall a b. (a -> b -> b) -> b -> Token symName symVal a -> b)
-> (forall b a. (b -> a -> b) -> b -> Token symName symVal a -> b)
-> (forall b a. (b -> a -> b) -> b -> Token symName symVal a -> b)
-> (forall a. (a -> a -> a) -> Token symName symVal a -> a)
-> (forall a. (a -> a -> a) -> Token symName symVal a -> a)
-> (forall a. Token symName symVal a -> [a])
-> (forall a. Token symName symVal a -> Bool)
-> (forall a. Token symName symVal a -> Int)
-> (forall a. Eq a => a -> Token symName symVal a -> Bool)
-> (forall a. Ord a => Token symName symVal a -> a)
-> (forall a. Ord a => Token symName symVal a -> a)
-> (forall a. Num a => Token symName symVal a -> a)
-> (forall a. Num a => Token symName symVal a -> a)
-> Foldable (Token symName symVal)
forall a. Eq a => a -> Token symName symVal a -> Bool
forall a. Num a => Token symName symVal a -> a
forall a. Ord a => Token symName symVal a -> a
forall m. Monoid m => Token symName symVal m -> m
forall a. Token symName symVal a -> Bool
forall a. Token symName symVal a -> Int
forall a. Token symName symVal a -> [a]
forall a. (a -> a -> a) -> Token symName symVal a -> a
forall m a. Monoid m => (a -> m) -> Token symName symVal a -> m
forall b a. (b -> a -> b) -> b -> Token symName symVal a -> b
forall a b. (a -> b -> b) -> b -> Token symName symVal a -> b
forall (symName :: Symbol) (symVal :: Nat) a.
Eq a =>
a -> Token symName symVal a -> Bool
forall (symName :: Symbol) (symVal :: Nat) a.
Num a =>
Token symName symVal a -> a
forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> a
forall (symName :: Symbol) (symVal :: Nat) m.
Monoid m =>
Token symName symVal m -> m
forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Bool
forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Int
forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> [a]
forall (symName :: Symbol) (symVal :: Nat) a.
(a -> a -> a) -> Token symName symVal a -> a
forall (symName :: Symbol) (symVal :: Nat) m a.
Monoid m =>
(a -> m) -> Token symName symVal a -> m
forall (symName :: Symbol) (symVal :: Nat) b a.
(b -> a -> b) -> b -> Token symName symVal a -> b
forall (symName :: Symbol) (symVal :: Nat) a b.
(a -> b -> b) -> b -> Token symName symVal a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Token symName symVal a -> a
$cproduct :: forall (symName :: Symbol) (symVal :: Nat) a.
Num a =>
Token symName symVal a -> a
sum :: Token symName symVal a -> a
$csum :: forall (symName :: Symbol) (symVal :: Nat) a.
Num a =>
Token symName symVal a -> a
minimum :: Token symName symVal a -> a
$cminimum :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> a
maximum :: Token symName symVal a -> a
$cmaximum :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> a
elem :: a -> Token symName symVal a -> Bool
$celem :: forall (symName :: Symbol) (symVal :: Nat) a.
Eq a =>
a -> Token symName symVal a -> Bool
length :: Token symName symVal a -> Int
$clength :: forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Int
null :: Token symName symVal a -> Bool
$cnull :: forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Bool
toList :: Token symName symVal a -> [a]
$ctoList :: forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> [a]
foldl1 :: (a -> a -> a) -> Token symName symVal a -> a
$cfoldl1 :: forall (symName :: Symbol) (symVal :: Nat) a.
(a -> a -> a) -> Token symName symVal a -> a
foldr1 :: (a -> a -> a) -> Token symName symVal a -> a
$cfoldr1 :: forall (symName :: Symbol) (symVal :: Nat) a.
(a -> a -> a) -> Token symName symVal a -> a
foldl' :: (b -> a -> b) -> b -> Token symName symVal a -> b
$cfoldl' :: forall (symName :: Symbol) (symVal :: Nat) b a.
(b -> a -> b) -> b -> Token symName symVal a -> b
foldl :: (b -> a -> b) -> b -> Token symName symVal a -> b
$cfoldl :: forall (symName :: Symbol) (symVal :: Nat) b a.
(b -> a -> b) -> b -> Token symName symVal a -> b
foldr' :: (a -> b -> b) -> b -> Token symName symVal a -> b
$cfoldr' :: forall (symName :: Symbol) (symVal :: Nat) a b.
(a -> b -> b) -> b -> Token symName symVal a -> b
foldr :: (a -> b -> b) -> b -> Token symName symVal a -> b
$cfoldr :: forall (symName :: Symbol) (symVal :: Nat) a b.
(a -> b -> b) -> b -> Token symName symVal a -> b
foldMap' :: (a -> m) -> Token symName symVal a -> m
$cfoldMap' :: forall (symName :: Symbol) (symVal :: Nat) m a.
Monoid m =>
(a -> m) -> Token symName symVal a -> m
foldMap :: (a -> m) -> Token symName symVal a -> m
$cfoldMap :: forall (symName :: Symbol) (symVal :: Nat) m a.
Monoid m =>
(a -> m) -> Token symName symVal a -> m
fold :: Token symName symVal m -> m
$cfold :: forall (symName :: Symbol) (symVal :: Nat) m.
Monoid m =>
Token symName symVal m -> m
Foldable, a -> Token symName symVal b -> Token symName symVal a
(a -> b) -> Token symName symVal a -> Token symName symVal b
(forall a b.
(a -> b) -> Token symName symVal a -> Token symName symVal b)
-> (forall a b.
a -> Token symName symVal b -> Token symName symVal a)
-> Functor (Token symName symVal)
forall a b. a -> Token symName symVal b -> Token symName symVal a
forall a b.
(a -> b) -> Token symName symVal a -> Token symName symVal b
forall (symName :: Symbol) (symVal :: Nat) a b.
a -> Token symName symVal b -> Token symName symVal a
forall (symName :: Symbol) (symVal :: Nat) a b.
(a -> b) -> Token symName symVal a -> Token symName symVal b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Token symName symVal b -> Token symName symVal a
$c<$ :: forall (symName :: Symbol) (symVal :: Nat) a b.
a -> Token symName symVal b -> Token symName symVal a
fmap :: (a -> b) -> Token symName symVal a -> Token symName symVal b
$cfmap :: forall (symName :: Symbol) (symVal :: Nat) a b.
(a -> b) -> Token symName symVal a -> Token symName symVal b
Functor, (forall x.
Token symName symVal a -> Rep (Token symName symVal a) x)
-> (forall x.
Rep (Token symName symVal a) x -> Token symName symVal a)
-> Generic (Token symName symVal a)
forall x. Rep (Token symName symVal a) x -> Token symName symVal a
forall x. Token symName symVal a -> Rep (Token symName symVal a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (symName :: Symbol) (symVal :: Nat) a x.
Rep (Token symName symVal a) x -> Token symName symVal a
forall (symName :: Symbol) (symVal :: Nat) a x.
Token symName symVal a -> Rep (Token symName symVal a) x
$cto :: forall (symName :: Symbol) (symVal :: Nat) a x.
Rep (Token symName symVal a) x -> Token symName symVal a
$cfrom :: forall (symName :: Symbol) (symVal :: Nat) a x.
Token symName symVal a -> Rep (Token symName symVal a) x
Generic, (forall a. Token symName symVal a -> Rep1 (Token symName symVal) a)
-> (forall a.
Rep1 (Token symName symVal) a -> Token symName symVal a)
-> Generic1 (Token symName symVal)
forall a. Rep1 (Token symName symVal) a -> Token symName symVal a
forall a. Token symName symVal a -> Rep1 (Token symName symVal) a
forall k (f :: k -> *).
(forall (a :: k). f a -> Rep1 f a)
-> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
forall (symName :: Symbol) (symVal :: Nat) a.
Rep1 (Token symName symVal) a -> Token symName symVal a
forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Rep1 (Token symName symVal) a
$cto1 :: forall (symName :: Symbol) (symVal :: Nat) a.
Rep1 (Token symName symVal) a -> Token symName symVal a
$cfrom1 :: forall (symName :: Symbol) (symVal :: Nat) a.
Token symName symVal a -> Rep1 (Token symName symVal) a
Generic1, Eq (Token symName symVal a)
Eq (Token symName symVal a) =>
(Token symName symVal a -> Token symName symVal a -> Ordering)
-> (Token symName symVal a -> Token symName symVal a -> Bool)
-> (Token symName symVal a -> Token symName symVal a -> Bool)
-> (Token symName symVal a -> Token symName symVal a -> Bool)
-> (Token symName symVal a -> Token symName symVal a -> Bool)
-> (Token symName symVal a
-> Token symName symVal a -> Token symName symVal a)
-> (Token symName symVal a
-> Token symName symVal a -> Token symName symVal a)
-> Ord (Token symName symVal a)
Token symName symVal a -> Token symName symVal a -> Bool
Token symName symVal a -> Token symName symVal a -> Ordering
Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Eq (Token symName symVal a)
forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Bool
forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Ordering
forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
min :: Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
$cmin :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
max :: Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
$cmax :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a
-> Token symName symVal a -> Token symName symVal a
>= :: Token symName symVal a -> Token symName symVal a -> Bool
$c>= :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Bool
> :: Token symName symVal a -> Token symName symVal a -> Bool
$c> :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Bool
<= :: Token symName symVal a -> Token symName symVal a -> Bool
$c<= :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Bool
< :: Token symName symVal a -> Token symName symVal a -> Bool
$c< :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Bool
compare :: Token symName symVal a -> Token symName symVal a -> Ordering
$ccompare :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Token symName symVal a -> Token symName symVal a -> Ordering
$cp1Ord :: forall (symName :: Symbol) (symVal :: Nat) a.
Ord a =>
Eq (Token symName symVal a)
Ord, Int -> Token symName symVal a -> ShowS
[Token symName symVal a] -> ShowS
Token symName symVal a -> String
(Int -> Token symName symVal a -> ShowS)
-> (Token symName symVal a -> String)
-> ([Token symName symVal a] -> ShowS)
-> Show (Token symName symVal a)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
Int -> Token symName symVal a -> ShowS
forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
[Token symName symVal a] -> ShowS
forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
Token symName symVal a -> String
showList :: [Token symName symVal a] -> ShowS
$cshowList :: forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
[Token symName symVal a] -> ShowS
show :: Token symName symVal a -> String
$cshow :: forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
Token symName symVal a -> String
showsPrec :: Int -> Token symName symVal a -> ShowS
$cshowsPrec :: forall (symName :: Symbol) (symVal :: Nat) a.
Show a =>
Int -> Token symName symVal a -> ShowS
Show, Functor (Token symName symVal)
Foldable (Token symName symVal)
(Functor (Token symName symVal),
Foldable (Token symName symVal)) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Token symName symVal a -> f (Token symName symVal b))
-> (forall (f :: * -> *) a.
Applicative f =>
Token symName symVal (f a) -> f (Token symName symVal a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Token symName symVal a -> m (Token symName symVal b))
-> (forall (m :: * -> *) a.
Monad m =>
Token symName symVal (m a) -> m (Token symName symVal a))
-> Traversable (Token symName symVal)
(a -> f b) -> Token symName symVal a -> f (Token symName symVal b)
forall (symName :: Symbol) (symVal :: Nat).
Functor (Token symName symVal)
forall (symName :: Symbol) (symVal :: Nat).
Foldable (Token symName symVal)
forall (symName :: Symbol) (symVal :: Nat) (m :: * -> *) a.
Monad m =>
Token symName symVal (m a) -> m (Token symName symVal a)
forall (symName :: Symbol) (symVal :: Nat) (f :: * -> *) a.
Applicative f =>
Token symName symVal (f a) -> f (Token symName symVal a)
forall (symName :: Symbol) (symVal :: Nat) (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Token symName symVal a -> m (Token symName symVal b)
forall (symName :: Symbol) (symVal :: Nat) (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Token symName symVal a -> f (Token symName symVal b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
Token symName symVal (m a) -> m (Token symName symVal a)
forall (f :: * -> *) a.
Applicative f =>
Token symName symVal (f a) -> f (Token symName symVal a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Token symName symVal a -> m (Token symName symVal b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Token symName symVal a -> f (Token symName symVal b)
sequence :: Token symName symVal (m a) -> m (Token symName symVal a)
$csequence :: forall (symName :: Symbol) (symVal :: Nat) (m :: * -> *) a.
Monad m =>
Token symName symVal (m a) -> m (Token symName symVal a)
mapM :: (a -> m b) -> Token symName symVal a -> m (Token symName symVal b)
$cmapM :: forall (symName :: Symbol) (symVal :: Nat) (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Token symName symVal a -> m (Token symName symVal b)
sequenceA :: Token symName symVal (f a) -> f (Token symName symVal a)
$csequenceA :: forall (symName :: Symbol) (symVal :: Nat) (f :: * -> *) a.
Applicative f =>
Token symName symVal (f a) -> f (Token symName symVal a)
traverse :: (a -> f b) -> Token symName symVal a -> f (Token symName symVal b)
$ctraverse :: forall (symName :: Symbol) (symVal :: Nat) (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Token symName symVal a -> f (Token symName symVal b)
$cp2Traversable :: forall (symName :: Symbol) (symVal :: Nat).
Foldable (Token symName symVal)
$cp1Traversable :: forall (symName :: Symbol) (symVal :: Nat).
Functor (Token symName symVal)
Traversable)