{-# LANGUAGE DeriveGeneric #-}
module MirageSyntax where
import Data.Aeson (ToJSON)
import GHC.Generics (Generic)
data Grammar = Grammar [Nonterminal] deriving forall x. Rep Grammar x -> Grammar
forall x. Grammar -> Rep Grammar x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Grammar x -> Grammar
$cfrom :: forall x. Grammar -> Rep Grammar x
Generic
instance ToJSON Grammar
data Nonterminal = Nonterminal
String
[String]
[Attribute]
[Attribute]
[Production]
deriving forall x. Rep Nonterminal x -> Nonterminal
forall x. Nonterminal -> Rep Nonterminal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Nonterminal x -> Nonterminal
$cfrom :: forall x. Nonterminal -> Rep Nonterminal x
Generic
instance ToJSON Nonterminal
data Attribute = Attribute
String
Type
deriving forall x. Rep Attribute x -> Attribute
forall x. Attribute -> Rep Attribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Attribute x -> Attribute
$cfrom :: forall x. Attribute -> Rep Attribute x
Generic
instance ToJSON Attribute
data Production = Production
String
[Child]
[Rule]
deriving forall x. Rep Production x -> Production
forall x. Production -> Rep Production x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Production x -> Production
$cfrom :: forall x. Production -> Rep Production x
Generic
instance ToJSON Production
data Child = Child
String
Type
deriving forall x. Rep Child x -> Child
forall x. Child -> Rep Child x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Child x -> Child
$cfrom :: forall x. Child -> Rep Child x
Generic
instance ToJSON Child
data Rule = Rule
[Address]
[Address]
Bool
String
String
deriving forall x. Rep Rule x -> Rule
forall x. Rule -> Rep Rule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Rule x -> Rule
$cfrom :: forall x. Rule -> Rep Rule x
Generic
instance ToJSON Rule
data Type
= Haskell String
| NT
String
[String]
| Self
deriving forall x. Rep Type x -> Type
forall x. Type -> Rep Type x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Type x -> Type
$cfrom :: forall x. Type -> Rep Type x
Generic
instance ToJSON Type
data Address = Address
String
String
deriving forall x. Rep Address x -> Address
forall x. Address -> Rep Address x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Address x -> Address
$cfrom :: forall x. Address -> Rep Address x
Generic
instance ToJSON Address