packages feed

keiro-dsl-0.22.0.0: test/conformance-mapped-structural-enum-equality/Generated/MappedStructuralEnumEquality/ScopeGate/Domain.hs

{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE TemplateHaskell #-}
-- @generated by keiro-dsl 0.22.0.0 (language keiro-dsl 6) from aggregate ScopeGate; do not edit.
module Generated.MappedStructuralEnumEquality.ScopeGate.Domain where

import Data.Aeson (FromJSON, ToJSON)
import Data.Proxy (Proxy (..))
import GHC.Generics (Generic)
import Keiki.Core (RegFile (..))
import Keiki.Shape (CanonicalStateShape, CanonicalTypeName)
import Conformance.MappedStructuralEnumEquality.Bindings qualified as Bindings
import Conformance.MappedStructuralEnumEquality.Domain (Request, RequiredScope)
import Keiki.Generics.TH (deriveAggregateCtorsAll, deriveWireCtorsAll)

data ScopeGateVertex = ScopeGateReady | ScopeGateDone
  deriving stock (Generic, Eq, Ord, Show, Enum, Bounded)
  deriving anyclass (ToJSON, FromJSON)
instance CanonicalStateShape ScopeGateVertex
instance CanonicalTypeName ScopeGateVertex

data MatchData = MatchData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data DifferData = DifferData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data EqRightData = EqRightData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data EqLeftData = EqLeftData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data NeRightData = NeRightData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data NeLeftData = NeLeftData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data SelfData = SelfData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data ScopeGateCommand = Match !MatchData
  | Differ !DifferData
  | EqRight !EqRightData
  | EqLeft !EqLeftData
  | NeRight !NeRightData
  | NeLeft !NeLeftData
  | Self !SelfData
  deriving stock (Generic, Eq, Show)

data MatchedData = MatchedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data DifferedData = DifferedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data EqRightAcceptedData = EqRightAcceptedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data EqLeftAcceptedData = EqLeftAcceptedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data NeRightAcceptedData = NeRightAcceptedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data NeLeftAcceptedData = NeLeftAcceptedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data SelfAcceptedData = SelfAcceptedData
  { requiredScope :: !RequiredScope
  , request :: !Request
  }
  deriving stock (Generic, Eq, Show)

data ScopeGateEvent = Matched !MatchedData
  | Differed !DifferedData
  | EqRightAccepted !EqRightAcceptedData
  | EqLeftAccepted !EqLeftAcceptedData
  | NeRightAccepted !NeRightAcceptedData
  | NeLeftAccepted !NeLeftAcceptedData
  | SelfAccepted !SelfAcceptedData
  deriving stock (Generic, Eq, Show)

type ScopeGateRegs =
  '[ '("requiredScope", RequiredScope)
   ]

initialScopeGateRegs :: RegFile ScopeGateRegs
initialScopeGateRegs =
  RCons (Proxy @"requiredScope") Bindings.initialScope RNil

$(deriveAggregateCtorsAll ''ScopeGateCommand ''ScopeGateRegs)



$(deriveWireCtorsAll ''ScopeGateEvent)