module Database.CQRS
  ( -- * Events
    Event(..)
  , WritableEvent(..)

    -- * Streams
  , Stream(..)
  , WritableStream(..)
  , EventWithContext(..)
  , EventWithContext'
  , MonadMetadata(..)
  , ConsistencyCheck(..)
  , writeEvent
  , writeEventCc
  , optimistically
  , StreamBounds(..)
  , StreamBounds'
  , afterEvent
  , untilEvent

    -- * Stream families
  , StreamFamily(..)

    -- * Aggregators and projections
  , Aggregator
  , runAggregator
  , Projection
  , runProjection
  , TrackedState(..)
  , TrackingTable(..)
  , InMemoryTrackingTable(..)
  , createInMemoryTrackingTable
  , executeInMemoryActions

    -- * Read models
  , ReadModel(..)

    -- * Transformers
  , Transformer
  , TransformedStream
  , transformStream
  , TransformedStreamFamily
  , transformStreamFamily
  , Transform
  , pushEvent
  , mergeEvents
  , flushEvents
  , failTransformer

  -- * Errors
  , Error(..)
  ) where

import Database.CQRS.Error
import Database.CQRS.Event
import Database.CQRS.Projection
import Database.CQRS.ReadModel
import Database.CQRS.Stream
import Database.CQRS.StreamFamily
import Database.CQRS.Transformer