keiro-dsl-0.7.0.0: test/conformance-workspace-nominals/Generated/WorkspaceNominalProof/ProjectArtifact/Domain.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
-- @generated by keiro-dsl; do not edit. Regenerated from the .keiro spec.
module Generated.WorkspaceNominalProof.ProjectArtifact.Domain where
import Data.Proxy (Proxy (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Keiki.Core (RegFile (..))
import Generated.WorkspaceNominalProof.Nominals (ProjectId (..), ProjectPhase (..))
import Keiki.Generics.TH (deriveAggregateCtorsAll, deriveWireCtorsAll)
data ProjectArtifactVertex = ProjectArtifactEmpty | ProjectArtifactRecorded
deriving stock (Generic, Eq, Ord, Show, Enum, Bounded)
data RecordArtifactData = RecordArtifactData
{ projectId :: !ProjectId
, phase :: !ProjectPhase
}
deriving stock (Generic, Eq, Show)
data ProjectArtifactCommand = RecordArtifact !RecordArtifactData
deriving stock (Generic, Eq, Show)
data ArtifactRecordedData = ArtifactRecordedData
{ projectId :: !ProjectId
, phase :: !ProjectPhase
}
deriving stock (Generic, Eq, Show)
data ProjectArtifactEvent = ArtifactRecorded !ArtifactRecordedData
deriving stock (Generic, Eq, Show)
type ProjectArtifactRegs =
'[ '("projectId", ProjectId)
, '("phase", ProjectPhase)
]
initialProjectArtifactRegs :: RegFile ProjectArtifactRegs
initialProjectArtifactRegs =
RCons (Proxy @"projectId") (ProjectId "") $
RCons (Proxy @"phase") Draft RNil
$(deriveAggregateCtorsAll ''ProjectArtifactCommand ''ProjectArtifactRegs)
$(deriveWireCtorsAll ''ProjectArtifactEvent)