{-# LANGUAGE DeriveGeneric     #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingVia       #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Strict            #-}
module Language.Happy.Ast
    ( Node, NodeF (..)
    ) where

import           Data.Aeson                   (FromJSON, FromJSON1, ToJSON,
                                               ToJSON1)
import           Data.Fix                     (Fix)
import           Data.Functor.Classes         (Eq1, Ord1, Read1, Show1)
import           Data.Functor.Classes.Generic (FunctorClassesDefault (..))
import           GHC.Generics                 (Generic, Generic1)

data NodeF lexeme a
    = Grammar [lexeme] [a] [a] [lexeme]
    | PragmaExpect lexeme
    | PragmaName lexeme lexeme
    | PragmaErrorHandlerType lexeme
    | PragmaError lexeme
    | PragmaLexer lexeme lexeme
    | PragmaMonad lexeme
    | PragmaTokenType lexeme
    | PragmaToken [a]
    | PragmaLeft [lexeme]
    | PragmaRight [lexeme]
    | Token lexeme lexeme
    | Rule a a
    | RuleType lexeme lexeme
    | RuleDefn lexeme [a]
    | RuleLine [lexeme] lexeme
    deriving (Int -> NodeF lexeme a -> ShowS
[NodeF lexeme a] -> ShowS
NodeF lexeme a -> String
(Int -> NodeF lexeme a -> ShowS)
-> (NodeF lexeme a -> String)
-> ([NodeF lexeme a] -> ShowS)
-> Show (NodeF lexeme a)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall lexeme a.
(Show lexeme, Show a) =>
Int -> NodeF lexeme a -> ShowS
forall lexeme a. (Show lexeme, Show a) => [NodeF lexeme a] -> ShowS
forall lexeme a. (Show lexeme, Show a) => NodeF lexeme a -> String
showList :: [NodeF lexeme a] -> ShowS
$cshowList :: forall lexeme a. (Show lexeme, Show a) => [NodeF lexeme a] -> ShowS
show :: NodeF lexeme a -> String
$cshow :: forall lexeme a. (Show lexeme, Show a) => NodeF lexeme a -> String
showsPrec :: Int -> NodeF lexeme a -> ShowS
$cshowsPrec :: forall lexeme a.
(Show lexeme, Show a) =>
Int -> NodeF lexeme a -> ShowS
Show, ReadPrec [NodeF lexeme a]
ReadPrec (NodeF lexeme a)
Int -> ReadS (NodeF lexeme a)
ReadS [NodeF lexeme a]
(Int -> ReadS (NodeF lexeme a))
-> ReadS [NodeF lexeme a]
-> ReadPrec (NodeF lexeme a)
-> ReadPrec [NodeF lexeme a]
-> Read (NodeF lexeme a)
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall lexeme a. (Read lexeme, Read a) => ReadPrec [NodeF lexeme a]
forall lexeme a. (Read lexeme, Read a) => ReadPrec (NodeF lexeme a)
forall lexeme a.
(Read lexeme, Read a) =>
Int -> ReadS (NodeF lexeme a)
forall lexeme a. (Read lexeme, Read a) => ReadS [NodeF lexeme a]
readListPrec :: ReadPrec [NodeF lexeme a]
$creadListPrec :: forall lexeme a. (Read lexeme, Read a) => ReadPrec [NodeF lexeme a]
readPrec :: ReadPrec (NodeF lexeme a)
$creadPrec :: forall lexeme a. (Read lexeme, Read a) => ReadPrec (NodeF lexeme a)
readList :: ReadS [NodeF lexeme a]
$creadList :: forall lexeme a. (Read lexeme, Read a) => ReadS [NodeF lexeme a]
readsPrec :: Int -> ReadS (NodeF lexeme a)
$creadsPrec :: forall lexeme a.
(Read lexeme, Read a) =>
Int -> ReadS (NodeF lexeme a)
Read, NodeF lexeme a -> NodeF lexeme a -> Bool
(NodeF lexeme a -> NodeF lexeme a -> Bool)
-> (NodeF lexeme a -> NodeF lexeme a -> Bool)
-> Eq (NodeF lexeme a)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall lexeme a.
(Eq lexeme, Eq a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
/= :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c/= :: forall lexeme a.
(Eq lexeme, Eq a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
== :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c== :: forall lexeme a.
(Eq lexeme, Eq a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
Eq, Eq (NodeF lexeme a)
Eq (NodeF lexeme a)
-> (NodeF lexeme a -> NodeF lexeme a -> Ordering)
-> (NodeF lexeme a -> NodeF lexeme a -> Bool)
-> (NodeF lexeme a -> NodeF lexeme a -> Bool)
-> (NodeF lexeme a -> NodeF lexeme a -> Bool)
-> (NodeF lexeme a -> NodeF lexeme a -> Bool)
-> (NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a)
-> (NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a)
-> Ord (NodeF lexeme a)
NodeF lexeme a -> NodeF lexeme a -> Bool
NodeF lexeme a -> NodeF lexeme a -> Ordering
NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme 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 lexeme a. (Ord lexeme, Ord a) => Eq (NodeF lexeme a)
forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Ordering
forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a
min :: NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a
$cmin :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a
max :: NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a
$cmax :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> NodeF lexeme a
>= :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c>= :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
> :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c> :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
<= :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c<= :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
< :: NodeF lexeme a -> NodeF lexeme a -> Bool
$c< :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Bool
compare :: NodeF lexeme a -> NodeF lexeme a -> Ordering
$ccompare :: forall lexeme a.
(Ord lexeme, Ord a) =>
NodeF lexeme a -> NodeF lexeme a -> Ordering
$cp1Ord :: forall lexeme a. (Ord lexeme, Ord a) => Eq (NodeF lexeme a)
Ord, (forall x. NodeF lexeme a -> Rep (NodeF lexeme a) x)
-> (forall x. Rep (NodeF lexeme a) x -> NodeF lexeme a)
-> Generic (NodeF lexeme a)
forall x. Rep (NodeF lexeme a) x -> NodeF lexeme a
forall x. NodeF lexeme a -> Rep (NodeF lexeme a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall lexeme a x. Rep (NodeF lexeme a) x -> NodeF lexeme a
forall lexeme a x. NodeF lexeme a -> Rep (NodeF lexeme a) x
$cto :: forall lexeme a x. Rep (NodeF lexeme a) x -> NodeF lexeme a
$cfrom :: forall lexeme a x. NodeF lexeme a -> Rep (NodeF lexeme a) x
Generic, (forall a. NodeF lexeme a -> Rep1 (NodeF lexeme) a)
-> (forall a. Rep1 (NodeF lexeme) a -> NodeF lexeme a)
-> Generic1 (NodeF lexeme)
forall a. Rep1 (NodeF lexeme) a -> NodeF lexeme a
forall a. NodeF lexeme a -> Rep1 (NodeF lexeme) a
forall lexeme a. Rep1 (NodeF lexeme) a -> NodeF lexeme a
forall lexeme a. NodeF lexeme a -> Rep1 (NodeF lexeme) a
forall k (f :: k -> *).
(forall (a :: k). f a -> Rep1 f a)
-> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
$cto1 :: forall lexeme a. Rep1 (NodeF lexeme) a -> NodeF lexeme a
$cfrom1 :: forall lexeme a. NodeF lexeme a -> Rep1 (NodeF lexeme) a
Generic1, a -> NodeF lexeme b -> NodeF lexeme a
(a -> b) -> NodeF lexeme a -> NodeF lexeme b
(forall a b. (a -> b) -> NodeF lexeme a -> NodeF lexeme b)
-> (forall a b. a -> NodeF lexeme b -> NodeF lexeme a)
-> Functor (NodeF lexeme)
forall a b. a -> NodeF lexeme b -> NodeF lexeme a
forall a b. (a -> b) -> NodeF lexeme a -> NodeF lexeme b
forall lexeme a b. a -> NodeF lexeme b -> NodeF lexeme a
forall lexeme a b. (a -> b) -> NodeF lexeme a -> NodeF lexeme b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> NodeF lexeme b -> NodeF lexeme a
$c<$ :: forall lexeme a b. a -> NodeF lexeme b -> NodeF lexeme a
fmap :: (a -> b) -> NodeF lexeme a -> NodeF lexeme b
$cfmap :: forall lexeme a b. (a -> b) -> NodeF lexeme a -> NodeF lexeme b
Functor, NodeF lexeme a -> Bool
(a -> m) -> NodeF lexeme a -> m
(a -> b -> b) -> b -> NodeF lexeme a -> b
(forall m. Monoid m => NodeF lexeme m -> m)
-> (forall m a. Monoid m => (a -> m) -> NodeF lexeme a -> m)
-> (forall m a. Monoid m => (a -> m) -> NodeF lexeme a -> m)
-> (forall a b. (a -> b -> b) -> b -> NodeF lexeme a -> b)
-> (forall a b. (a -> b -> b) -> b -> NodeF lexeme a -> b)
-> (forall b a. (b -> a -> b) -> b -> NodeF lexeme a -> b)
-> (forall b a. (b -> a -> b) -> b -> NodeF lexeme a -> b)
-> (forall a. (a -> a -> a) -> NodeF lexeme a -> a)
-> (forall a. (a -> a -> a) -> NodeF lexeme a -> a)
-> (forall a. NodeF lexeme a -> [a])
-> (forall a. NodeF lexeme a -> Bool)
-> (forall a. NodeF lexeme a -> Int)
-> (forall a. Eq a => a -> NodeF lexeme a -> Bool)
-> (forall a. Ord a => NodeF lexeme a -> a)
-> (forall a. Ord a => NodeF lexeme a -> a)
-> (forall a. Num a => NodeF lexeme a -> a)
-> (forall a. Num a => NodeF lexeme a -> a)
-> Foldable (NodeF lexeme)
forall a. Eq a => a -> NodeF lexeme a -> Bool
forall a. Num a => NodeF lexeme a -> a
forall a. Ord a => NodeF lexeme a -> a
forall m. Monoid m => NodeF lexeme m -> m
forall a. NodeF lexeme a -> Bool
forall a. NodeF lexeme a -> Int
forall a. NodeF lexeme a -> [a]
forall a. (a -> a -> a) -> NodeF lexeme a -> a
forall lexeme a. Eq a => a -> NodeF lexeme a -> Bool
forall lexeme a. Num a => NodeF lexeme a -> a
forall lexeme a. Ord a => NodeF lexeme a -> a
forall m a. Monoid m => (a -> m) -> NodeF lexeme a -> m
forall lexeme m. Monoid m => NodeF lexeme m -> m
forall lexeme a. NodeF lexeme a -> Bool
forall lexeme a. NodeF lexeme a -> Int
forall lexeme a. NodeF lexeme a -> [a]
forall b a. (b -> a -> b) -> b -> NodeF lexeme a -> b
forall a b. (a -> b -> b) -> b -> NodeF lexeme a -> b
forall lexeme a. (a -> a -> a) -> NodeF lexeme a -> a
forall lexeme m a. Monoid m => (a -> m) -> NodeF lexeme a -> m
forall lexeme b a. (b -> a -> b) -> b -> NodeF lexeme a -> b
forall lexeme a b. (a -> b -> b) -> b -> NodeF lexeme 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 :: NodeF lexeme a -> a
$cproduct :: forall lexeme a. Num a => NodeF lexeme a -> a
sum :: NodeF lexeme a -> a
$csum :: forall lexeme a. Num a => NodeF lexeme a -> a
minimum :: NodeF lexeme a -> a
$cminimum :: forall lexeme a. Ord a => NodeF lexeme a -> a
maximum :: NodeF lexeme a -> a
$cmaximum :: forall lexeme a. Ord a => NodeF lexeme a -> a
elem :: a -> NodeF lexeme a -> Bool
$celem :: forall lexeme a. Eq a => a -> NodeF lexeme a -> Bool
length :: NodeF lexeme a -> Int
$clength :: forall lexeme a. NodeF lexeme a -> Int
null :: NodeF lexeme a -> Bool
$cnull :: forall lexeme a. NodeF lexeme a -> Bool
toList :: NodeF lexeme a -> [a]
$ctoList :: forall lexeme a. NodeF lexeme a -> [a]
foldl1 :: (a -> a -> a) -> NodeF lexeme a -> a
$cfoldl1 :: forall lexeme a. (a -> a -> a) -> NodeF lexeme a -> a
foldr1 :: (a -> a -> a) -> NodeF lexeme a -> a
$cfoldr1 :: forall lexeme a. (a -> a -> a) -> NodeF lexeme a -> a
foldl' :: (b -> a -> b) -> b -> NodeF lexeme a -> b
$cfoldl' :: forall lexeme b a. (b -> a -> b) -> b -> NodeF lexeme a -> b
foldl :: (b -> a -> b) -> b -> NodeF lexeme a -> b
$cfoldl :: forall lexeme b a. (b -> a -> b) -> b -> NodeF lexeme a -> b
foldr' :: (a -> b -> b) -> b -> NodeF lexeme a -> b
$cfoldr' :: forall lexeme a b. (a -> b -> b) -> b -> NodeF lexeme a -> b
foldr :: (a -> b -> b) -> b -> NodeF lexeme a -> b
$cfoldr :: forall lexeme a b. (a -> b -> b) -> b -> NodeF lexeme a -> b
foldMap' :: (a -> m) -> NodeF lexeme a -> m
$cfoldMap' :: forall lexeme m a. Monoid m => (a -> m) -> NodeF lexeme a -> m
foldMap :: (a -> m) -> NodeF lexeme a -> m
$cfoldMap :: forall lexeme m a. Monoid m => (a -> m) -> NodeF lexeme a -> m
fold :: NodeF lexeme m -> m
$cfold :: forall lexeme m. Monoid m => NodeF lexeme m -> m
Foldable, Functor (NodeF lexeme)
Foldable (NodeF lexeme)
Functor (NodeF lexeme)
-> Foldable (NodeF lexeme)
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> NodeF lexeme a -> f (NodeF lexeme b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    NodeF lexeme (f a) -> f (NodeF lexeme a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> NodeF lexeme a -> m (NodeF lexeme b))
-> (forall (m :: * -> *) a.
    Monad m =>
    NodeF lexeme (m a) -> m (NodeF lexeme a))
-> Traversable (NodeF lexeme)
(a -> f b) -> NodeF lexeme a -> f (NodeF lexeme b)
forall lexeme. Functor (NodeF lexeme)
forall lexeme. Foldable (NodeF lexeme)
forall lexeme (m :: * -> *) a.
Monad m =>
NodeF lexeme (m a) -> m (NodeF lexeme a)
forall lexeme (f :: * -> *) a.
Applicative f =>
NodeF lexeme (f a) -> f (NodeF lexeme a)
forall lexeme (m :: * -> *) a b.
Monad m =>
(a -> m b) -> NodeF lexeme a -> m (NodeF lexeme b)
forall lexeme (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> NodeF lexeme a -> f (NodeF lexeme 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 =>
NodeF lexeme (m a) -> m (NodeF lexeme a)
forall (f :: * -> *) a.
Applicative f =>
NodeF lexeme (f a) -> f (NodeF lexeme a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> NodeF lexeme a -> m (NodeF lexeme b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> NodeF lexeme a -> f (NodeF lexeme b)
sequence :: NodeF lexeme (m a) -> m (NodeF lexeme a)
$csequence :: forall lexeme (m :: * -> *) a.
Monad m =>
NodeF lexeme (m a) -> m (NodeF lexeme a)
mapM :: (a -> m b) -> NodeF lexeme a -> m (NodeF lexeme b)
$cmapM :: forall lexeme (m :: * -> *) a b.
Monad m =>
(a -> m b) -> NodeF lexeme a -> m (NodeF lexeme b)
sequenceA :: NodeF lexeme (f a) -> f (NodeF lexeme a)
$csequenceA :: forall lexeme (f :: * -> *) a.
Applicative f =>
NodeF lexeme (f a) -> f (NodeF lexeme a)
traverse :: (a -> f b) -> NodeF lexeme a -> f (NodeF lexeme b)
$ctraverse :: forall lexeme (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> NodeF lexeme a -> f (NodeF lexeme b)
$cp2Traversable :: forall lexeme. Foldable (NodeF lexeme)
$cp1Traversable :: forall lexeme. Functor (NodeF lexeme)
Traversable)
    deriving ((Int -> a -> ShowS)
-> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS
(Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS
(forall a.
 (Int -> a -> ShowS)
 -> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS)
-> (forall a.
    (Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS)
-> Show1 (NodeF lexeme)
forall lexeme a.
Show lexeme =>
(Int -> a -> ShowS)
-> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS
forall lexeme a.
Show lexeme =>
(Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS
forall a.
(Int -> a -> ShowS)
-> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS
forall a.
(Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS
forall (f :: * -> *).
(forall a.
 (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS)
-> (forall a.
    (Int -> a -> ShowS) -> ([a] -> ShowS) -> [f a] -> ShowS)
-> Show1 f
liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS
$cliftShowList :: forall lexeme a.
Show lexeme =>
(Int -> a -> ShowS) -> ([a] -> ShowS) -> [NodeF lexeme a] -> ShowS
liftShowsPrec :: (Int -> a -> ShowS)
-> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS
$cliftShowsPrec :: forall lexeme a.
Show lexeme =>
(Int -> a -> ShowS)
-> ([a] -> ShowS) -> Int -> NodeF lexeme a -> ShowS
Show1, ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a)
ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a]
(Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a)
(Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a]
(forall a.
 (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a))
-> (forall a.
    (Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a])
-> (forall a.
    ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a))
-> (forall a.
    ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a])
-> Read1 (NodeF lexeme)
forall lexeme a.
Read lexeme =>
ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a]
forall lexeme a.
Read lexeme =>
ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a)
forall lexeme a.
Read lexeme =>
(Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a)
forall lexeme a.
Read lexeme =>
(Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a]
forall a. ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a]
forall a. ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a)
forall a.
(Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a)
forall a. (Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a]
forall (f :: * -> *).
(forall a. (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a))
-> (forall a. (Int -> ReadS a) -> ReadS [a] -> ReadS [f a])
-> (forall a. ReadPrec a -> ReadPrec [a] -> ReadPrec (f a))
-> (forall a. ReadPrec a -> ReadPrec [a] -> ReadPrec [f a])
-> Read1 f
liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a]
$cliftReadListPrec :: forall lexeme a.
Read lexeme =>
ReadPrec a -> ReadPrec [a] -> ReadPrec [NodeF lexeme a]
liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a)
$cliftReadPrec :: forall lexeme a.
Read lexeme =>
ReadPrec a -> ReadPrec [a] -> ReadPrec (NodeF lexeme a)
liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a]
$cliftReadList :: forall lexeme a.
Read lexeme =>
(Int -> ReadS a) -> ReadS [a] -> ReadS [NodeF lexeme a]
liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a)
$cliftReadsPrec :: forall lexeme a.
Read lexeme =>
(Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NodeF lexeme a)
Read1, (a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool
(forall a b.
 (a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool)
-> Eq1 (NodeF lexeme)
forall lexeme a b.
Eq lexeme =>
(a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool
forall a b.
(a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool
forall (f :: * -> *).
(forall a b. (a -> b -> Bool) -> f a -> f b -> Bool) -> Eq1 f
liftEq :: (a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool
$cliftEq :: forall lexeme a b.
Eq lexeme =>
(a -> b -> Bool) -> NodeF lexeme a -> NodeF lexeme b -> Bool
Eq1, Eq1 (NodeF lexeme)
Eq1 (NodeF lexeme)
-> (forall a b.
    (a -> b -> Ordering)
    -> NodeF lexeme a -> NodeF lexeme b -> Ordering)
-> Ord1 (NodeF lexeme)
(a -> b -> Ordering)
-> NodeF lexeme a -> NodeF lexeme b -> Ordering
forall lexeme. Ord lexeme => Eq1 (NodeF lexeme)
forall lexeme a b.
Ord lexeme =>
(a -> b -> Ordering)
-> NodeF lexeme a -> NodeF lexeme b -> Ordering
forall a b.
(a -> b -> Ordering)
-> NodeF lexeme a -> NodeF lexeme b -> Ordering
forall (f :: * -> *).
Eq1 f
-> (forall a b. (a -> b -> Ordering) -> f a -> f b -> Ordering)
-> Ord1 f
liftCompare :: (a -> b -> Ordering)
-> NodeF lexeme a -> NodeF lexeme b -> Ordering
$cliftCompare :: forall lexeme a b.
Ord lexeme =>
(a -> b -> Ordering)
-> NodeF lexeme a -> NodeF lexeme b -> Ordering
$cp1Ord1 :: forall lexeme. Ord lexeme => Eq1 (NodeF lexeme)
Ord1) via FunctorClassesDefault (NodeF lexeme)

type Node lexeme = Fix (NodeF lexeme)

instance FromJSON lexeme => FromJSON1 (NodeF lexeme)
instance ToJSON lexeme => ToJSON1 (NodeF lexeme)