{-# LANGUAGE DeriveFunctor     #-}
{-# LANGUAGE DeriveGeneric     #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE StrictData        #-}
module Language.Cimple.AST
    ( AssignOp (..)
    , BinaryOp (..)
    , UnaryOp (..)
    , LiteralType (..)
    , Node (..)
    , Scope (..)
    , CommentStyle (..)
    ) where

import           Data.Aeson   (FromJSON, ToJSON)
import           GHC.Generics (Generic)

data Node lexeme
    -- Preprocessor
    = PreprocInclude lexeme
    | PreprocDefine lexeme
    | PreprocDefineConst lexeme (Node lexeme)
    | PreprocDefineMacro lexeme [Node lexeme] (Node lexeme)
    | PreprocIf (Node lexeme) [Node lexeme] (Node lexeme)
    | PreprocIfdef lexeme [Node lexeme] (Node lexeme)
    | PreprocIfndef lexeme [Node lexeme] (Node lexeme)
    | PreprocElse [Node lexeme]
    | PreprocElif (Node lexeme) [Node lexeme] (Node lexeme)
    | PreprocUndef lexeme
    | PreprocDefined lexeme
    | PreprocScopedDefine (Node lexeme) [Node lexeme] (Node lexeme)
    | MacroBodyStmt [Node lexeme]
    | MacroBodyFunCall (Node lexeme)
    | MacroParam lexeme
    | StaticAssert (Node lexeme) lexeme
    -- Comments
    | LicenseDecl lexeme [Node lexeme]
    | CopyrightDecl lexeme (Maybe lexeme) [lexeme]
    | Comment CommentStyle lexeme [Node lexeme] lexeme
    | CommentBlock lexeme
    | CommentWord lexeme
    | Commented (Node lexeme) (Node lexeme)
    -- Namespace-like blocks
    | ExternC [Node lexeme]
    | Class Scope lexeme [Node lexeme] [Node lexeme]
    | Namespace Scope lexeme [Node lexeme]
    -- Statements
    | CompoundStmt [Node lexeme]
    | Break
    | Goto lexeme
    | Continue
    | Return (Maybe (Node lexeme))
    | SwitchStmt (Node lexeme) [Node lexeme]
    | IfStmt (Node lexeme) [Node lexeme] (Maybe (Node lexeme))
    | ForStmt (Node lexeme) (Node lexeme) (Node lexeme) [Node lexeme]
    | WhileStmt (Node lexeme) [Node lexeme]
    | DoWhileStmt [Node lexeme] (Node lexeme)
    | Case (Node lexeme) (Node lexeme)
    | Default (Node lexeme)
    | Label lexeme (Node lexeme)
    -- Variable declarations
    | VLA (Node lexeme) lexeme (Node lexeme)
    | VarDecl (Node lexeme) (Node lexeme)
    | Declarator (Node lexeme) (Maybe (Node lexeme))
    | DeclSpecVar lexeme
    | DeclSpecArray (Node lexeme) (Maybe (Node lexeme))
    -- Expressions
    | InitialiserList [Node lexeme]
    | UnaryExpr UnaryOp (Node lexeme)
    | BinaryExpr (Node lexeme) BinaryOp (Node lexeme)
    | TernaryExpr (Node lexeme) (Node lexeme) (Node lexeme)
    | AssignExpr (Node lexeme) AssignOp (Node lexeme)
    | ParenExpr (Node lexeme)
    | CastExpr (Node lexeme) (Node lexeme)
    | SizeofExpr (Node lexeme)
    | SizeofType (Node lexeme)
    | LiteralExpr LiteralType lexeme
    | VarExpr lexeme
    | MemberAccess (Node lexeme) lexeme
    | PointerAccess (Node lexeme) lexeme
    | ArrayAccess (Node lexeme) (Node lexeme)
    | FunctionCall (Node lexeme) [Node lexeme]
    | CommentExpr (Node lexeme) (Node lexeme)
    -- Type definitions
    | EnumClass lexeme [Node lexeme]
    | EnumConsts (Maybe lexeme) [Node lexeme]
    | EnumDecl lexeme [Node lexeme] lexeme
    | Enumerator lexeme (Maybe (Node lexeme))
    | ClassForward lexeme [Node lexeme]
    | Typedef (Node lexeme) lexeme
    | TypedefFunction (Node lexeme)
    | Struct lexeme [Node lexeme]
    | Union lexeme [Node lexeme]
    | MemberDecl (Node lexeme) (Node lexeme) (Maybe lexeme)
    | TyConst (Node lexeme)
    | TyPointer (Node lexeme)
    | TyStruct lexeme
    | TyFunc lexeme
    | TyStd lexeme
    | TyVar lexeme
    | TyUserDefined lexeme
    -- Functions
    | FunctionDecl Scope (Node lexeme) (Maybe (Node lexeme))
    | FunctionDefn Scope (Node lexeme) [Node lexeme]
    | FunctionPrototype (Node lexeme) lexeme [Node lexeme]
    | FunctionParam (Node lexeme) (Node lexeme)
    | Event lexeme (Node lexeme)
    | EventParams [Node lexeme]
    | Property (Node lexeme) (Node lexeme) [Node lexeme]
    | Accessor lexeme [Node lexeme] (Maybe (Node lexeme))
    | ErrorDecl lexeme [Node lexeme]
    | ErrorList [Node lexeme]
    | ErrorFor lexeme
    | Ellipsis
    -- Constants
    | ConstDecl (Node lexeme) lexeme
    | ConstDefn Scope (Node lexeme) lexeme (Node lexeme)
    deriving (Int -> Node lexeme -> ShowS
[Node lexeme] -> ShowS
Node lexeme -> String
(Int -> Node lexeme -> ShowS)
-> (Node lexeme -> String)
-> ([Node lexeme] -> ShowS)
-> Show (Node lexeme)
forall lexeme. Show lexeme => Int -> Node lexeme -> ShowS
forall lexeme. Show lexeme => [Node lexeme] -> ShowS
forall lexeme. Show lexeme => Node lexeme -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Node lexeme] -> ShowS
$cshowList :: forall lexeme. Show lexeme => [Node lexeme] -> ShowS
show :: Node lexeme -> String
$cshow :: forall lexeme. Show lexeme => Node lexeme -> String
showsPrec :: Int -> Node lexeme -> ShowS
$cshowsPrec :: forall lexeme. Show lexeme => Int -> Node lexeme -> ShowS
Show, Node lexeme -> Node lexeme -> Bool
(Node lexeme -> Node lexeme -> Bool)
-> (Node lexeme -> Node lexeme -> Bool) -> Eq (Node lexeme)
forall lexeme. Eq lexeme => Node lexeme -> Node lexeme -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Node lexeme -> Node lexeme -> Bool
$c/= :: forall lexeme. Eq lexeme => Node lexeme -> Node lexeme -> Bool
== :: Node lexeme -> Node lexeme -> Bool
$c== :: forall lexeme. Eq lexeme => Node lexeme -> Node lexeme -> Bool
Eq, (forall x. Node lexeme -> Rep (Node lexeme) x)
-> (forall x. Rep (Node lexeme) x -> Node lexeme)
-> Generic (Node lexeme)
forall x. Rep (Node lexeme) x -> Node lexeme
forall x. Node lexeme -> Rep (Node lexeme) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall lexeme x. Rep (Node lexeme) x -> Node lexeme
forall lexeme x. Node lexeme -> Rep (Node lexeme) x
$cto :: forall lexeme x. Rep (Node lexeme) x -> Node lexeme
$cfrom :: forall lexeme x. Node lexeme -> Rep (Node lexeme) x
Generic, a -> Node b -> Node a
(a -> b) -> Node a -> Node b
(forall a b. (a -> b) -> Node a -> Node b)
-> (forall a b. a -> Node b -> Node a) -> Functor Node
forall a b. a -> Node b -> Node a
forall a b. (a -> b) -> Node a -> Node b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Node b -> Node a
$c<$ :: forall a b. a -> Node b -> Node a
fmap :: (a -> b) -> Node a -> Node b
$cfmap :: forall a b. (a -> b) -> Node a -> Node b
Functor, Node a -> Bool
(a -> m) -> Node a -> m
(a -> b -> b) -> b -> Node a -> b
(forall m. Monoid m => Node m -> m)
-> (forall m a. Monoid m => (a -> m) -> Node a -> m)
-> (forall m a. Monoid m => (a -> m) -> Node a -> m)
-> (forall a b. (a -> b -> b) -> b -> Node a -> b)
-> (forall a b. (a -> b -> b) -> b -> Node a -> b)
-> (forall b a. (b -> a -> b) -> b -> Node a -> b)
-> (forall b a. (b -> a -> b) -> b -> Node a -> b)
-> (forall a. (a -> a -> a) -> Node a -> a)
-> (forall a. (a -> a -> a) -> Node a -> a)
-> (forall a. Node a -> [a])
-> (forall a. Node a -> Bool)
-> (forall a. Node a -> Int)
-> (forall a. Eq a => a -> Node a -> Bool)
-> (forall a. Ord a => Node a -> a)
-> (forall a. Ord a => Node a -> a)
-> (forall a. Num a => Node a -> a)
-> (forall a. Num a => Node a -> a)
-> Foldable Node
forall a. Eq a => a -> Node a -> Bool
forall a. Num a => Node a -> a
forall a. Ord a => Node a -> a
forall m. Monoid m => Node m -> m
forall a. Node a -> Bool
forall a. Node a -> Int
forall a. Node a -> [a]
forall a. (a -> a -> a) -> Node a -> a
forall m a. Monoid m => (a -> m) -> Node a -> m
forall b a. (b -> a -> b) -> b -> Node a -> b
forall a b. (a -> b -> b) -> b -> Node 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 :: Node a -> a
$cproduct :: forall a. Num a => Node a -> a
sum :: Node a -> a
$csum :: forall a. Num a => Node a -> a
minimum :: Node a -> a
$cminimum :: forall a. Ord a => Node a -> a
maximum :: Node a -> a
$cmaximum :: forall a. Ord a => Node a -> a
elem :: a -> Node a -> Bool
$celem :: forall a. Eq a => a -> Node a -> Bool
length :: Node a -> Int
$clength :: forall a. Node a -> Int
null :: Node a -> Bool
$cnull :: forall a. Node a -> Bool
toList :: Node a -> [a]
$ctoList :: forall a. Node a -> [a]
foldl1 :: (a -> a -> a) -> Node a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Node a -> a
foldr1 :: (a -> a -> a) -> Node a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Node a -> a
foldl' :: (b -> a -> b) -> b -> Node a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Node a -> b
foldl :: (b -> a -> b) -> b -> Node a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Node a -> b
foldr' :: (a -> b -> b) -> b -> Node a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Node a -> b
foldr :: (a -> b -> b) -> b -> Node a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Node a -> b
foldMap' :: (a -> m) -> Node a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Node a -> m
foldMap :: (a -> m) -> Node a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Node a -> m
fold :: Node m -> m
$cfold :: forall m. Monoid m => Node m -> m
Foldable, Functor Node
Foldable Node
Functor Node
-> Foldable Node
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Node a -> f (Node b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    Node (f a) -> f (Node a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Node a -> m (Node b))
-> (forall (m :: * -> *) a. Monad m => Node (m a) -> m (Node a))
-> Traversable Node
(a -> f b) -> Node a -> f (Node 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 => Node (m a) -> m (Node a)
forall (f :: * -> *) a. Applicative f => Node (f a) -> f (Node a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Node a -> m (Node b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Node a -> f (Node b)
sequence :: Node (m a) -> m (Node a)
$csequence :: forall (m :: * -> *) a. Monad m => Node (m a) -> m (Node a)
mapM :: (a -> m b) -> Node a -> m (Node b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Node a -> m (Node b)
sequenceA :: Node (f a) -> f (Node a)
$csequenceA :: forall (f :: * -> *) a. Applicative f => Node (f a) -> f (Node a)
traverse :: (a -> f b) -> Node a -> f (Node b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Node a -> f (Node b)
$cp2Traversable :: Foldable Node
$cp1Traversable :: Functor Node
Traversable)

instance FromJSON lexeme => FromJSON (Node lexeme)
instance ToJSON lexeme => ToJSON (Node lexeme)

data AssignOp
    = AopEq
    | AopMul
    | AopDiv
    | AopPlus
    | AopMinus
    | AopBitAnd
    | AopBitOr
    | AopBitXor
    | AopMod
    | AopLsh
    | AopRsh
    deriving (Int -> AssignOp -> ShowS
[AssignOp] -> ShowS
AssignOp -> String
(Int -> AssignOp -> ShowS)
-> (AssignOp -> String) -> ([AssignOp] -> ShowS) -> Show AssignOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssignOp] -> ShowS
$cshowList :: [AssignOp] -> ShowS
show :: AssignOp -> String
$cshow :: AssignOp -> String
showsPrec :: Int -> AssignOp -> ShowS
$cshowsPrec :: Int -> AssignOp -> ShowS
Show, AssignOp -> AssignOp -> Bool
(AssignOp -> AssignOp -> Bool)
-> (AssignOp -> AssignOp -> Bool) -> Eq AssignOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssignOp -> AssignOp -> Bool
$c/= :: AssignOp -> AssignOp -> Bool
== :: AssignOp -> AssignOp -> Bool
$c== :: AssignOp -> AssignOp -> Bool
Eq, (forall x. AssignOp -> Rep AssignOp x)
-> (forall x. Rep AssignOp x -> AssignOp) -> Generic AssignOp
forall x. Rep AssignOp x -> AssignOp
forall x. AssignOp -> Rep AssignOp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssignOp x -> AssignOp
$cfrom :: forall x. AssignOp -> Rep AssignOp x
Generic)

instance FromJSON AssignOp
instance ToJSON AssignOp

data BinaryOp
    = BopNe
    | BopEq
    | BopOr
    | BopBitXor
    | BopBitOr
    | BopAnd
    | BopBitAnd
    | BopDiv
    | BopMul
    | BopMod
    | BopPlus
    | BopMinus
    | BopLt
    | BopLe
    | BopLsh
    | BopGt
    | BopGe
    | BopRsh
    deriving (Int -> BinaryOp -> ShowS
[BinaryOp] -> ShowS
BinaryOp -> String
(Int -> BinaryOp -> ShowS)
-> (BinaryOp -> String) -> ([BinaryOp] -> ShowS) -> Show BinaryOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BinaryOp] -> ShowS
$cshowList :: [BinaryOp] -> ShowS
show :: BinaryOp -> String
$cshow :: BinaryOp -> String
showsPrec :: Int -> BinaryOp -> ShowS
$cshowsPrec :: Int -> BinaryOp -> ShowS
Show, BinaryOp -> BinaryOp -> Bool
(BinaryOp -> BinaryOp -> Bool)
-> (BinaryOp -> BinaryOp -> Bool) -> Eq BinaryOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BinaryOp -> BinaryOp -> Bool
$c/= :: BinaryOp -> BinaryOp -> Bool
== :: BinaryOp -> BinaryOp -> Bool
$c== :: BinaryOp -> BinaryOp -> Bool
Eq, (forall x. BinaryOp -> Rep BinaryOp x)
-> (forall x. Rep BinaryOp x -> BinaryOp) -> Generic BinaryOp
forall x. Rep BinaryOp x -> BinaryOp
forall x. BinaryOp -> Rep BinaryOp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BinaryOp x -> BinaryOp
$cfrom :: forall x. BinaryOp -> Rep BinaryOp x
Generic)

instance FromJSON BinaryOp
instance ToJSON BinaryOp

data UnaryOp
    = UopNot
    | UopNeg
    | UopMinus
    | UopAddress
    | UopDeref
    | UopIncr
    | UopDecr
    deriving (Int -> UnaryOp -> ShowS
[UnaryOp] -> ShowS
UnaryOp -> String
(Int -> UnaryOp -> ShowS)
-> (UnaryOp -> String) -> ([UnaryOp] -> ShowS) -> Show UnaryOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnaryOp] -> ShowS
$cshowList :: [UnaryOp] -> ShowS
show :: UnaryOp -> String
$cshow :: UnaryOp -> String
showsPrec :: Int -> UnaryOp -> ShowS
$cshowsPrec :: Int -> UnaryOp -> ShowS
Show, UnaryOp -> UnaryOp -> Bool
(UnaryOp -> UnaryOp -> Bool)
-> (UnaryOp -> UnaryOp -> Bool) -> Eq UnaryOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnaryOp -> UnaryOp -> Bool
$c/= :: UnaryOp -> UnaryOp -> Bool
== :: UnaryOp -> UnaryOp -> Bool
$c== :: UnaryOp -> UnaryOp -> Bool
Eq, (forall x. UnaryOp -> Rep UnaryOp x)
-> (forall x. Rep UnaryOp x -> UnaryOp) -> Generic UnaryOp
forall x. Rep UnaryOp x -> UnaryOp
forall x. UnaryOp -> Rep UnaryOp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnaryOp x -> UnaryOp
$cfrom :: forall x. UnaryOp -> Rep UnaryOp x
Generic)

instance FromJSON UnaryOp
instance ToJSON UnaryOp

data LiteralType
    = Char
    | Int
    | Bool
    | String
    | ConstId
    deriving (Int -> LiteralType -> ShowS
[LiteralType] -> ShowS
LiteralType -> String
(Int -> LiteralType -> ShowS)
-> (LiteralType -> String)
-> ([LiteralType] -> ShowS)
-> Show LiteralType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LiteralType] -> ShowS
$cshowList :: [LiteralType] -> ShowS
show :: LiteralType -> String
$cshow :: LiteralType -> String
showsPrec :: Int -> LiteralType -> ShowS
$cshowsPrec :: Int -> LiteralType -> ShowS
Show, LiteralType -> LiteralType -> Bool
(LiteralType -> LiteralType -> Bool)
-> (LiteralType -> LiteralType -> Bool) -> Eq LiteralType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LiteralType -> LiteralType -> Bool
$c/= :: LiteralType -> LiteralType -> Bool
== :: LiteralType -> LiteralType -> Bool
$c== :: LiteralType -> LiteralType -> Bool
Eq, (forall x. LiteralType -> Rep LiteralType x)
-> (forall x. Rep LiteralType x -> LiteralType)
-> Generic LiteralType
forall x. Rep LiteralType x -> LiteralType
forall x. LiteralType -> Rep LiteralType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LiteralType x -> LiteralType
$cfrom :: forall x. LiteralType -> Rep LiteralType x
Generic)

instance FromJSON LiteralType
instance ToJSON LiteralType

data Scope
    = Global
    | Static
    deriving (Int -> Scope -> ShowS
[Scope] -> ShowS
Scope -> String
(Int -> Scope -> ShowS)
-> (Scope -> String) -> ([Scope] -> ShowS) -> Show Scope
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Scope] -> ShowS
$cshowList :: [Scope] -> ShowS
show :: Scope -> String
$cshow :: Scope -> String
showsPrec :: Int -> Scope -> ShowS
$cshowsPrec :: Int -> Scope -> ShowS
Show, Scope -> Scope -> Bool
(Scope -> Scope -> Bool) -> (Scope -> Scope -> Bool) -> Eq Scope
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Scope -> Scope -> Bool
$c/= :: Scope -> Scope -> Bool
== :: Scope -> Scope -> Bool
$c== :: Scope -> Scope -> Bool
Eq, (forall x. Scope -> Rep Scope x)
-> (forall x. Rep Scope x -> Scope) -> Generic Scope
forall x. Rep Scope x -> Scope
forall x. Scope -> Rep Scope x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Scope x -> Scope
$cfrom :: forall x. Scope -> Rep Scope x
Generic)

instance FromJSON Scope
instance ToJSON Scope

data CommentStyle
    = Regular
    | Doxygen
    | Block
    deriving (Int -> CommentStyle -> ShowS
[CommentStyle] -> ShowS
CommentStyle -> String
(Int -> CommentStyle -> ShowS)
-> (CommentStyle -> String)
-> ([CommentStyle] -> ShowS)
-> Show CommentStyle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommentStyle] -> ShowS
$cshowList :: [CommentStyle] -> ShowS
show :: CommentStyle -> String
$cshow :: CommentStyle -> String
showsPrec :: Int -> CommentStyle -> ShowS
$cshowsPrec :: Int -> CommentStyle -> ShowS
Show, CommentStyle -> CommentStyle -> Bool
(CommentStyle -> CommentStyle -> Bool)
-> (CommentStyle -> CommentStyle -> Bool) -> Eq CommentStyle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommentStyle -> CommentStyle -> Bool
$c/= :: CommentStyle -> CommentStyle -> Bool
== :: CommentStyle -> CommentStyle -> Bool
$c== :: CommentStyle -> CommentStyle -> Bool
Eq, (forall x. CommentStyle -> Rep CommentStyle x)
-> (forall x. Rep CommentStyle x -> CommentStyle)
-> Generic CommentStyle
forall x. Rep CommentStyle x -> CommentStyle
forall x. CommentStyle -> Rep CommentStyle x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CommentStyle x -> CommentStyle
$cfrom :: forall x. CommentStyle -> Rep CommentStyle x
Generic)

instance FromJSON CommentStyle
instance ToJSON CommentStyle