Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bindings/haskell/benchmark/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import Data.Maybe (Maybe (..))
import Data.Text qualified as Text
import Data.Unrestricted.Linear (Ur)
import Data.Word (Word64)
import EventSorcery.Engine (
import Event.Sorcery.Engine (
EngineError,
OpenOptions (OpenOptions),
Store,
closeStore,
openStore,
)
import EventSorcery.Job (
import Event.Sorcery.Job (
ClaimBudget (ClaimBudget),
ClaimedJob,
JobClaimDetails,
Expand All @@ -43,7 +43,7 @@ import EventSorcery.Job (
mkJobId,
settlementToken,
)
import EventSorcery.Stream (
import Event.Sorcery.Stream (
AggregateId (AggregateId),
AggregateType (AggregateType),
EventType (EventType),
Expand Down
40 changes: 20 additions & 20 deletions bindings/haskell/event-sorcery.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,33 @@ common strict
library acquisition
import: strict
hs-source-dirs: src
exposed-modules: EventSorcery.Engine.Acquisition
exposed-modules: Event.Sorcery.Engine.Acquisition
build-depends: base >=4.18 && <5

library
import: strict
hs-source-dirs: src
exposed-modules:
EventSorcery.Aggregate
EventSorcery.Dispatch
EventSorcery.Dispatch.TestSupport
EventSorcery.Dispatch.Worker
EventSorcery.Engine
EventSorcery.Engine.Internal.FFI
EventSorcery.Job
EventSorcery.Job.Execution
EventSorcery.Job.Worker
EventSorcery.Snapshot
EventSorcery.Store
EventSorcery.Stream
Event.Sorcery.Aggregate
Event.Sorcery.Dispatch
Event.Sorcery.Dispatch.TestSupport
Event.Sorcery.Dispatch.Worker
Event.Sorcery.Engine
Event.Sorcery.Engine.Internal.FFI
Event.Sorcery.Job
Event.Sorcery.Job.Execution
Event.Sorcery.Job.Worker
Event.Sorcery.Snapshot
Event.Sorcery.Store
Event.Sorcery.Stream

other-modules:
EventSorcery.Dispatch.Internal
EventSorcery.Engine.Acquisition
EventSorcery.Engine.Internal
EventSorcery.Job.Definition
EventSorcery.Job.Worker.Definition
EventSorcery.Job.Worker.Internal
Event.Sorcery.Dispatch.Internal
Event.Sorcery.Engine.Acquisition
Event.Sorcery.Engine.Internal
Event.Sorcery.Job.Definition
Event.Sorcery.Job.Worker.Definition
Event.Sorcery.Job.Worker.Internal

extra-libraries: event_sorcery_ffi
build-depends:
Expand Down Expand Up @@ -106,7 +106,7 @@ test-suite engine-spec
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: EngineSpec.hs
other-modules: EventSorcery.Engine.AcquisitionSpec
other-modules: Event.Sorcery.Engine.AcquisitionSpec
ghc-options: -threaded -with-rtsopts=-N
build-depends:
, base >=4.18 && <5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE FunctionalDependencies #-}

module EventSorcery.Aggregate (
module Event.Sorcery.Aggregate (
DecodeCause (..),
DispatchIntent,
Dispatches (..),
Expand All @@ -21,8 +21,8 @@ import Data.Proxy (Proxy)
import Data.Text (Text)
import Data.Type.Equality (type (~))
import Data.Word (Word16)
import EventSorcery.Dispatch (DispatchOutcome, JobDispatch)
import EventSorcery.Job.Definition (
import Event.Sorcery.Dispatch (DispatchOutcome, JobDispatch)
import Event.Sorcery.Job.Definition (
Job (..),
JobId,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Dispatch (
module Event.Sorcery.Dispatch (
DispatchEvent (..),
DispatchFailure (..),
DispatchOutcome,
Expand All @@ -23,7 +23,7 @@ module EventSorcery.Dispatch (
) where

import Data.Word (Word32)
import EventSorcery.Dispatch.Internal (
import Event.Sorcery.Dispatch.Internal (
DispatchEvent (..),
DispatchFailure (..),
DispatchOutcome,
Expand All @@ -39,7 +39,7 @@ import EventSorcery.Dispatch.Internal (
originateDispatch,
settleDispatch,
)
import EventSorcery.Job.Definition (JobId)
import Event.Sorcery.Job.Definition (JobId)


dispatchJob :: JobDispatch job -> job
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Dispatch.Internal (
module Event.Sorcery.Dispatch.Internal (
DispatchEvent (..),
DispatchFailure (..),
DispatchOutcome (..),
Expand All @@ -19,7 +19,7 @@ module EventSorcery.Dispatch.Internal (

import Data.Text (Text)
import Data.Word (Word32)
import EventSorcery.Job.Definition (
import Event.Sorcery.Job.Definition (
DeadReason,
Job (JobError, JobOutput),
JobId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module EventSorcery.Dispatch.TestSupport (
module Event.Sorcery.Dispatch.TestSupport (
confirmedOutcome,
failedOutcome,
) where

import Data.Word (Word32)
import EventSorcery.Dispatch.Internal (
import Event.Sorcery.Dispatch.Internal (
DispatchFailure,
DispatchOutcome,
)
import EventSorcery.Dispatch.Internal qualified as Internal
import EventSorcery.Job.Definition (
import Event.Sorcery.Dispatch.Internal qualified as Internal
import Event.Sorcery.Job.Definition (
Job (JobError, JobOutput),
JobId,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Dispatch.Worker (
module Event.Sorcery.Dispatch.Worker (
DeliveryPolicy,
DispatchWorker,
OriginDeliveryError (..),
Expand All @@ -12,38 +12,38 @@ module EventSorcery.Dispatch.Worker (
) where

import Data.Word (Word32)
import EventSorcery.Aggregate (
import Event.Sorcery.Aggregate (
Dispatches (injectDispatchOutcome),
EventSourced,
)
import EventSorcery.Dispatch (DispatchFailure (..), DispatchOutcome)
import EventSorcery.Dispatch.Internal qualified as Dispatch
import EventSorcery.Job (
import Event.Sorcery.Dispatch (DispatchFailure (..), DispatchOutcome)
import Event.Sorcery.Dispatch.Internal qualified as Dispatch
import Event.Sorcery.Job (
DeadReason (RetriesExhausted),
Job (JobError, JobOutput),
JobId,
JobInstant,
)
import EventSorcery.Job.Execution (
import Event.Sorcery.Job.Execution (
DurableJob (renderJobError),
JobAttempt (JobAttempt),
)
import EventSorcery.Job.Worker (
import Event.Sorcery.Job.Worker (
JobRunError,
JobRunResult,
JobWorker,
)
import EventSorcery.Job.Worker.Internal (
import Event.Sorcery.Job.Worker.Internal (
SettlementStrategy (..),
VerdictDelivery (..),
runJobOnceWith,
)
import EventSorcery.Store (
import Event.Sorcery.Store (
Store,
StoreError (..),
executeCommand,
)
import EventSorcery.Stream (StreamKey)
import Event.Sorcery.Stream (StreamKey)
import Prelude (Either (..), IO, pure)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- | The engine feature: opening a store, closing it, and the ABI it speaks.
--
-- The lifecycle plumbing and the call marshalling stay in
-- "EventSorcery.Engine.Internal"; this module is the consumer-facing half of
-- "Event.Sorcery.Engine.Internal"; this module is the consumer-facing half of
-- the feature, including the error vocabulary every engine call answers with.
module EventSorcery.Engine (
module Event.Sorcery.Engine (
AbiVersionDetail (..),
AggregateId (..),
AggregateType (..),
Expand All @@ -29,7 +29,7 @@ module EventSorcery.Engine (
supportedAbiMajor,
) where

import EventSorcery.Engine.Internal (
import Event.Sorcery.Engine.Internal (
AbiVersionDetail (..),
AggregateId (..),
AggregateType (..),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Engine.Acquisition (
module Event.Sorcery.Engine.Acquisition (
StoreAcquisition (..),
acquireStore,
) where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- | The engine feature: the store handle, its lifecycle, and the ABI it speaks.
--
-- "EventSorcery.Engine" re-exports the consumer-facing half of this module.
-- "Event.Sorcery.Engine" re-exports the consumer-facing half of this module.
-- The call marshalling and the errors every call can answer with stay here so
-- the stream and job features can issue engine calls without republishing the
-- ABI plumbing to consumers.
module EventSorcery.Engine.Internal (
module Event.Sorcery.Engine.Internal (
AbiVersionDetail (..),
AggregateId (..),
AggregateType (..),
Expand Down Expand Up @@ -67,19 +67,19 @@ import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
import Data.Text (Text)
import Data.Text qualified as Text
import Data.Word (Word32, Word64, Word8)
import EventSorcery.Engine.Acquisition (
import Event.Sorcery.Engine.Acquisition (
StoreAcquisition (..),
acquireStore,
)
import EventSorcery.Engine.Internal.FFI (
import Event.Sorcery.Engine.Internal.FFI (
EsBuf (..),
EsStore,
esAbiVersion,
esBufFree,
esClose,
esOpen,
)
import EventSorcery.Job.Definition (JobId (..))
import Event.Sorcery.Job.Definition (JobId (..))
import Foreign.C.Types (CInt, CSize)
import Foreign.Concurrent qualified as Foreign
import Foreign.ForeignPtr (ForeignPtr, withForeignPtr)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Engine.Internal.FFI (
module Event.Sorcery.Engine.Internal.FFI (
EsBuf (..),
EsStore,
esAbiVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
-- Everything a consumer needs to enqueue a job, take a claim on it and settle
-- that claim is here, down to the wire codecs the engine and this binding
-- agree on. The engine handle and the errors every call can answer with belong
-- to "EventSorcery.Engine" and are re-exported so a job worker needs this one
-- to "Event.Sorcery.Engine" and are re-exported so a job worker needs this one
-- import.
--
-- Committing events together with a job intent belongs to this feature rather
-- than to the stream: what the caller is buying is that the events and the
-- intent land in one transaction, and the intent is the half a job can refuse.
module EventSorcery.Job (
module Event.Sorcery.Job (
AbiVersionDetail (..),
AggregateId (..),
AggregateType (..),
Expand Down Expand Up @@ -101,7 +101,7 @@ import Data.List.NonEmpty qualified as NonEmpty
import Data.Text (Text)
import Data.Unrestricted.Linear (Ur (Ur))
import Data.Word (Word32, Word64, Word8)
import EventSorcery.Engine.Internal (
import Event.Sorcery.Engine.Internal (
AbiVersionDetail (..),
AggregateId (..),
AggregateType (..),
Expand All @@ -123,7 +123,7 @@ import EventSorcery.Engine.Internal (
withInputBuffer,
withOpenStore,
)
import EventSorcery.Engine.Internal.FFI (
import Event.Sorcery.Engine.Internal.FFI (
EsBuf,
EsStore,
esCommitWithJob,
Expand All @@ -136,15 +136,15 @@ import EventSorcery.Engine.Internal.FFI (
esJobRenew,
esJobRetry,
)
import EventSorcery.Job.Definition (
import Event.Sorcery.Job.Definition (
DeadReason (..),
Job (..),
JobDecodeError (..),
jobIdText,
jobType,
mkJobId,
)
import EventSorcery.Stream (
import Event.Sorcery.Stream (
ProposedEvent,
StreamIdentity,
encodeProposedEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE AllowAmbiguousTypes #-}

module EventSorcery.Job.Definition (
module Event.Sorcery.Job.Definition (
DeadReason (..),
Job (..),
JobDecodeError (..),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Job.Execution (
module Event.Sorcery.Job.Execution (
DurableJob (..),
JobAttempt (..),
JobContext (..),
Expand All @@ -11,7 +11,7 @@ module EventSorcery.Job.Execution (
import Data.Kind (Type)
import Data.Text (Text)
import Data.Word (Word32)
import EventSorcery.Job (
import Event.Sorcery.Job (
Job (JobError, JobOutput),
JobExecutionRoute (ReconcileExecution, SubmitExecution),
JobId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module EventSorcery.Job.Worker (
module Event.Sorcery.Job.Worker (
AttemptLimit,
JobRunError (..),
JobRunResult (..),
Expand All @@ -11,9 +11,9 @@ module EventSorcery.Job.Worker (
runJobOnce,
) where

import EventSorcery.Job (Job (JobError, JobOutput), JobId, JobInstant)
import EventSorcery.Job.Execution (DurableJob)
import EventSorcery.Job.Worker.Definition (
import Event.Sorcery.Job (Job (JobError, JobOutput), JobId, JobInstant)
import Event.Sorcery.Job.Execution (DurableJob)
import Event.Sorcery.Job.Worker.Definition (
AttemptLimit,
JobRunError (..),
JobRunResult (..),
Expand All @@ -24,7 +24,7 @@ import EventSorcery.Job.Worker.Definition (
renewalSchedule,
renewingJobWorker,
)
import EventSorcery.Job.Worker.Internal (
import Event.Sorcery.Job.Worker.Internal (
genericSettlement,
runJobOnceWith,
)
Expand Down
Loading
Loading