domaindriven-0.5.0: Batteries included event sourcing and CQRS
Safe HaskellSafe-Inferred
LanguageHaskell2010

DomainDriven

Synopsis

Documentation

mkId :: MonadIO m => m UUID #

type family Event p #

type family Model p #

class ReadModel p where #

Associated Types

type Model p #

type Event p #

Methods

applyEvent :: p -> Model p -> Stored (Event p) -> Model p #

getModel :: p -> IO (Model p) #

getEventList :: p -> IO [Stored (Event p)] #

getEventStream :: p -> SerialT IO (Stored (Event p)) #

class ReadModel p => WriteModel p where #

Methods

transactionalUpdate :: MonadUnliftIO m => p -> (Model p -> m (Model p -> a, [Event p])) -> m a #

data Stored a #

Wrapper for stored data This ensures all events have a unique ID and a timestamp, without having to deal with that when implementing the model.

Constructors

Stored 

Instances

Instances details
Foldable Stored 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

fold :: Monoid m => Stored m -> m #

foldMap :: Monoid m => (a -> m) -> Stored a -> m #

foldMap' :: Monoid m => (a -> m) -> Stored a -> m #

foldr :: (a -> b -> b) -> b -> Stored a -> b #

foldr' :: (a -> b -> b) -> b -> Stored a -> b #

foldl :: (b -> a -> b) -> b -> Stored a -> b #

foldl' :: (b -> a -> b) -> b -> Stored a -> b #

foldr1 :: (a -> a -> a) -> Stored a -> a #

foldl1 :: (a -> a -> a) -> Stored a -> a #

toList :: Stored a -> [a] #

null :: Stored a -> Bool #

length :: Stored a -> Int #

elem :: Eq a => a -> Stored a -> Bool #

maximum :: Ord a => Stored a -> a #

minimum :: Ord a => Stored a -> a #

sum :: Num a => Stored a -> a #

product :: Num a => Stored a -> a #

Traversable Stored 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

traverse :: Applicative f => (a -> f b) -> Stored a -> f (Stored b) #

sequenceA :: Applicative f => Stored (f a) -> f (Stored a) #

mapM :: Monad m => (a -> m b) -> Stored a -> m (Stored b) #

sequence :: Monad m => Stored (m a) -> m (Stored a) #

Functor Stored 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

fmap :: (a -> b) -> Stored a -> Stored b #

(<$) :: a -> Stored b -> Stored a #

FromJSON a => FromJSON (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

ToJSON a => ToJSON (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Generic (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Associated Types

type Rep (Stored a) :: Type -> Type #

Methods

from :: Stored a -> Rep (Stored a) x #

to :: Rep (Stored a) x -> Stored a #

Show a => Show (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

showsPrec :: Int -> Stored a -> ShowS #

show :: Stored a -> String #

showList :: [Stored a] -> ShowS #

NFData a => NFData (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

rnf :: Stored a -> () #

Eq a => Eq (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

(==) :: Stored a -> Stored a -> Bool #

(/=) :: Stored a -> Stored a -> Bool #

Ord a => Ord (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

Methods

compare :: Stored a -> Stored a -> Ordering #

(<) :: Stored a -> Stored a -> Bool #

(<=) :: Stored a -> Stored a -> Bool #

(>) :: Stored a -> Stored a -> Bool #

(>=) :: Stored a -> Stored a -> Bool #

max :: Stored a -> Stored a -> Stored a #

min :: Stored a -> Stored a -> Stored a #

type Rep (Stored a) 
Instance details

Defined in DomainDriven.Persistance.Class

type Rep (Stored a) = D1 ('MetaData "Stored" "DomainDriven.Persistance.Class" "domaindriven-core-0.5.0-AmW7GcARdax4Kg7GRvMA1d" 'False) (C1 ('MetaCons "Stored" 'PrefixI 'True) (S1 ('MetaSel ('Just "storedEvent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "storedTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "storedUUID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID))))

data UUID #

Type representing Universally Unique Identifiers (UUID) as specified in RFC 4122.

Instances

Instances details
FromJSON UUID 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey UUID 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON UUID 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey UUID 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UUID -> c UUID #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UUID #

toConstr :: UUID -> Constr #

dataTypeOf :: UUID -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UUID) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UUID) #

gmapT :: (forall b. Data b => b -> b) -> UUID -> UUID #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQ :: (forall d. Data d => d -> u) -> UUID -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UUID -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

Storable UUID

This Storable instance uses the memory layout as described in RFC 4122, but in contrast to the Binary instance, the fields are stored in host byte order.

Instance details

Defined in Data.UUID.Types.Internal

Methods

sizeOf :: UUID -> Int #

alignment :: UUID -> Int #

peekElemOff :: Ptr UUID -> Int -> IO UUID #

pokeElemOff :: Ptr UUID -> Int -> UUID -> IO () #

peekByteOff :: Ptr b -> Int -> IO UUID #

pokeByteOff :: Ptr b -> Int -> UUID -> IO () #

peek :: Ptr UUID -> IO UUID #

poke :: Ptr UUID -> UUID -> IO () #

Read UUID 
Instance details

Defined in Data.UUID.Types.Internal

Show UUID

Pretty prints a UUID (without quotation marks). See also toString.

>>> show nil
"00000000-0000-0000-0000-000000000000"
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

Binary UUID

This Binary instance is compatible with RFC 4122, storing the fields in network order as 16 bytes.

Instance details

Defined in Data.UUID.Types.Internal

Methods

put :: UUID -> Put #

get :: Get UUID #

putList :: [UUID] -> Put #

NFData UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

rnf :: UUID -> () #

Eq UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

(==) :: UUID -> UUID -> Bool #

(/=) :: UUID -> UUID -> Bool #

Ord UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UUID -> UUID -> Ordering #

(<) :: UUID -> UUID -> Bool #

(<=) :: UUID -> UUID -> Bool #

(>) :: UUID -> UUID -> Bool #

(>=) :: UUID -> UUID -> Bool #

max :: UUID -> UUID -> UUID #

min :: UUID -> UUID -> UUID #

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int #

hash :: UUID -> Int #

FromHttpApiData UUID 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData UUID 
Instance details

Defined in Web.Internal.HttpApiData

ToParamSchema UUID 
Instance details

Defined in Data.OpenApi.Internal.ParamSchema

ToSchema UUID

For ToJSON instance, see uuid-aeson package.

Instance details

Defined in Data.OpenApi.Internal.Schema

Random UUID

This Random instance produces insecure version 4 UUIDs as specified in RFC 4122.

Instance details

Defined in Data.UUID.Types.Internal

Methods

randomR :: RandomGen g => (UUID, UUID) -> g -> (UUID, g) #

random :: RandomGen g => g -> (UUID, g) #

randomRs :: RandomGen g => (UUID, UUID) -> g -> [UUID] #

randoms :: RandomGen g => g -> [UUID] #

Uniform UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

uniformM :: StatefulGen g m => g -> m UUID #

Lift UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

lift :: Quote m => UUID -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => UUID -> Code m UUID #

data NF9 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 (f5 :: Symbol) a5 (f6 :: Symbol) a6 (f7 :: Symbol) a7 (f8 :: Symbol) a8 (f9 :: Symbol) a9 Source #

Constructors

NF9 a1 a2 a3 a4 a5 a6 a7 a8 a9 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4, KnownSymbol f5, FromJSON a5, KnownSymbol f6, FromJSON a6, KnownSymbol f7, FromJSON a7, KnownSymbol f8, FromJSON a8, KnownSymbol f9, FromJSON a9) => FromJSON (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) #

parseJSONList :: Value -> Parser [NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4, KnownSymbol f5, ToJSON a5, KnownSymbol f6, ToJSON a6, KnownSymbol f7, ToJSON a7, KnownSymbol f8, ToJSON a8, KnownSymbol f9, ToJSON a9) => ToJSON (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 -> Value #

toEncoding :: NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 -> Encoding #

toJSONList :: [NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9] -> Value #

toEncodingList :: [NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9] -> Encoding #

Generic (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) :: Type -> Type #

Methods

from :: NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 -> Rep (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) x #

to :: Rep (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) x -> NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 #

(Show a1, Show a2, Show a3, Show a4, Show a5, Show a6, Show a7, Show a8, Show a9) => Show (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 -> ShowS #

show :: NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9 -> String #

showList :: [NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4, KnownSymbol f5, ToSchema a5, KnownSymbol f6, ToSchema a6, KnownSymbol f7, ToSchema a7, KnownSymbol f8, ToSchema a8, KnownSymbol f9, ToSchema a9) => ToSchema (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF9 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 f9 a9) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

data NF8 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 (f5 :: Symbol) a5 (f6 :: Symbol) a6 (f7 :: Symbol) a7 (f8 :: Symbol) a8 Source #

Constructors

NF8 a1 a2 a3 a4 a5 a6 a7 a8 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4, KnownSymbol f5, FromJSON a5, KnownSymbol f6, FromJSON a6, KnownSymbol f7, FromJSON a7, KnownSymbol f8, FromJSON a8) => FromJSON (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) #

parseJSONList :: Value -> Parser [NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4, KnownSymbol f5, ToJSON a5, KnownSymbol f6, ToJSON a6, KnownSymbol f7, ToJSON a7, KnownSymbol f8, ToJSON a8) => ToJSON (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 -> Value #

toEncoding :: NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 -> Encoding #

toJSONList :: [NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8] -> Value #

toEncodingList :: [NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8] -> Encoding #

Generic (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) :: Type -> Type #

Methods

from :: NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 -> Rep (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) x #

to :: Rep (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) x -> NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 #

(Show a1, Show a2, Show a3, Show a4, Show a5, Show a6, Show a7, Show a8) => Show (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 -> ShowS #

show :: NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8 -> String #

showList :: [NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4, KnownSymbol f5, ToSchema a5, KnownSymbol f6, ToSchema a6, KnownSymbol f7, ToSchema a7, KnownSymbol f8, ToSchema a8) => ToSchema (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF8 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 f8 a8) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

data NF7 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 (f5 :: Symbol) a5 (f6 :: Symbol) a6 (f7 :: Symbol) a7 Source #

Constructors

NF7 a1 a2 a3 a4 a5 a6 a7 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4, KnownSymbol f5, FromJSON a5, KnownSymbol f6, FromJSON a6, KnownSymbol f7, FromJSON a7) => FromJSON (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) #

parseJSONList :: Value -> Parser [NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4, KnownSymbol f5, ToJSON a5, KnownSymbol f6, ToJSON a6, KnownSymbol f7, ToJSON a7) => ToJSON (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 -> Value #

toEncoding :: NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 -> Encoding #

toJSONList :: [NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7] -> Value #

toEncodingList :: [NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7] -> Encoding #

Generic (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) :: Type -> Type #

Methods

from :: NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 -> Rep (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) x #

to :: Rep (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) x -> NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 #

(Show a1, Show a2, Show a3, Show a4, Show a5, Show a6, Show a7) => Show (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 -> ShowS #

show :: NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7 -> String #

showList :: [NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4, KnownSymbol f5, ToSchema a5, KnownSymbol f6, ToSchema a6, KnownSymbol f7, ToSchema a7) => ToSchema (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF7 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 f7 a7) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

data NF6 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 (f5 :: Symbol) a5 (f6 :: Symbol) a6 Source #

Constructors

NF6 a1 a2 a3 a4 a5 a6 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4, KnownSymbol f5, FromJSON a5, KnownSymbol f6, FromJSON a6) => FromJSON (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) #

parseJSONList :: Value -> Parser [NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4, KnownSymbol f5, ToJSON a5, KnownSymbol f6, ToJSON a6) => ToJSON (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 -> Value #

toEncoding :: NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 -> Encoding #

toJSONList :: [NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6] -> Value #

toEncodingList :: [NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6] -> Encoding #

Generic (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) :: Type -> Type #

Methods

from :: NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 -> Rep (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) x #

to :: Rep (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) x -> NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 #

(Show a1, Show a2, Show a3, Show a4, Show a5, Show a6) => Show (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 -> ShowS #

show :: NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6 -> String #

showList :: [NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4, KnownSymbol f5, ToSchema a5, KnownSymbol f6, ToSchema a6) => ToSchema (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF6 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 f6 a6) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

data NF5 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 (f5 :: Symbol) a5 Source #

Constructors

NF5 a1 a2 a3 a4 a5 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4, KnownSymbol f5, FromJSON a5) => FromJSON (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) #

parseJSONList :: Value -> Parser [NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4, KnownSymbol f5, ToJSON a5) => ToJSON (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 -> Value #

toEncoding :: NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 -> Encoding #

toJSONList :: [NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5] -> Value #

toEncodingList :: [NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5] -> Encoding #

Generic (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) :: Type -> Type #

Methods

from :: NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 -> Rep (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) x #

to :: Rep (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) x -> NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 #

(Show a1, Show a2, Show a3, Show a4, Show a5) => Show (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 -> ShowS #

show :: NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5 -> String #

showList :: [NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4, KnownSymbol f5, ToSchema a5) => ToSchema (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF5 name f1 a1 f2 a2 f3 a3 f4 a4 f5 a5) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

data NF4 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 (f4 :: Symbol) a4 Source #

Constructors

NF4 a1 a2 a3 a4 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3, KnownSymbol f4, FromJSON a4) => FromJSON (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) #

parseJSONList :: Value -> Parser [NF4 name f1 a1 f2 a2 f3 a3 f4 a4] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3, KnownSymbol f4, ToJSON a4) => ToJSON (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF4 name f1 a1 f2 a2 f3 a3 f4 a4 -> Value #

toEncoding :: NF4 name f1 a1 f2 a2 f3 a3 f4 a4 -> Encoding #

toJSONList :: [NF4 name f1 a1 f2 a2 f3 a3 f4 a4] -> Value #

toEncodingList :: [NF4 name f1 a1 f2 a2 f3 a3 f4 a4] -> Encoding #

Generic (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) :: Type -> Type #

Methods

from :: NF4 name f1 a1 f2 a2 f3 a3 f4 a4 -> Rep (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) x #

to :: Rep (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) x -> NF4 name f1 a1 f2 a2 f3 a3 f4 a4 #

(Show a1, Show a2, Show a3, Show a4) => Show (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF4 name f1 a1 f2 a2 f3 a3 f4 a4 -> ShowS #

show :: NF4 name f1 a1 f2 a2 f3 a3 f4 a4 -> String #

showList :: [NF4 name f1 a1 f2 a2 f3 a3 f4 a4] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3, KnownSymbol f4, ToSchema a4) => ToSchema (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF4 name f1 a1 f2 a2 f3 a3 f4 a4) = D1 ('MetaData "NF4" "DomainDriven.Internal.NamedFields" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "NF4" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a1) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a2)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a3) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a4))))

data NF3 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 (f3 :: Symbol) a3 Source #

Constructors

NF3 a1 a2 a3 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2, KnownSymbol f3, FromJSON a3) => FromJSON (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF3 name f1 a1 f2 a2 f3 a3) #

parseJSONList :: Value -> Parser [NF3 name f1 a1 f2 a2 f3 a3] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2, KnownSymbol f3, ToJSON a3) => ToJSON (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF3 name f1 a1 f2 a2 f3 a3 -> Value #

toEncoding :: NF3 name f1 a1 f2 a2 f3 a3 -> Encoding #

toJSONList :: [NF3 name f1 a1 f2 a2 f3 a3] -> Value #

toEncodingList :: [NF3 name f1 a1 f2 a2 f3 a3] -> Encoding #

Generic (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF3 name f1 a1 f2 a2 f3 a3) :: Type -> Type #

Methods

from :: NF3 name f1 a1 f2 a2 f3 a3 -> Rep (NF3 name f1 a1 f2 a2 f3 a3) x #

to :: Rep (NF3 name f1 a1 f2 a2 f3 a3) x -> NF3 name f1 a1 f2 a2 f3 a3 #

(Show a1, Show a2, Show a3) => Show (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF3 name f1 a1 f2 a2 f3 a3 -> ShowS #

show :: NF3 name f1 a1 f2 a2 f3 a3 -> String #

showList :: [NF3 name f1 a1 f2 a2 f3 a3] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2, KnownSymbol f3, ToSchema a3) => ToSchema (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

declareNamedSchema :: Proxy (NF3 name f1 a1 f2 a2 f3 a3) -> Declare (Definitions Schema) NamedSchema #

type Rep (NF3 name f1 a1 f2 a2 f3 a3) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF3 name f1 a1 f2 a2 f3 a3) = D1 ('MetaData "NF3" "DomainDriven.Internal.NamedFields" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "NF3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a1) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a2) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a3))))

data NF2 (name :: Symbol) (f1 :: Symbol) a1 (f2 :: Symbol) a2 Source #

Constructors

NF2 a1 a2 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1, KnownSymbol f2, FromJSON a2) => FromJSON (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF2 name f1 a1 f2 a2) #

parseJSONList :: Value -> Parser [NF2 name f1 a1 f2 a2] #

(KnownSymbol f1, ToJSON a1, KnownSymbol f2, ToJSON a2) => ToJSON (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF2 name f1 a1 f2 a2 -> Value #

toEncoding :: NF2 name f1 a1 f2 a2 -> Encoding #

toJSONList :: [NF2 name f1 a1 f2 a2] -> Value #

toEncodingList :: [NF2 name f1 a1 f2 a2] -> Encoding #

Generic (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF2 name f1 a1 f2 a2) :: Type -> Type #

Methods

from :: NF2 name f1 a1 f2 a2 -> Rep (NF2 name f1 a1 f2 a2) x #

to :: Rep (NF2 name f1 a1 f2 a2) x -> NF2 name f1 a1 f2 a2 #

(Show a1, Show a2) => Show (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF2 name f1 a1 f2 a2 -> ShowS #

show :: NF2 name f1 a1 f2 a2 -> String #

showList :: [NF2 name f1 a1 f2 a2] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1, KnownSymbol f2, ToSchema a2) => ToSchema (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF2 name f1 a1 f2 a2) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF2 name f1 a1 f2 a2) = D1 ('MetaData "NF2" "DomainDriven.Internal.NamedFields" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "NF2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a1) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a2)))

data NF1 (name :: Symbol) (f1 :: Symbol) ty Source #

Constructors

NF1 ty 

Instances

Instances details
(KnownSymbol name, KnownSymbol f1, FromJSON a1) => FromJSON (NF1 name f1 a1) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

parseJSON :: Value -> Parser (NF1 name f1 a1) #

parseJSONList :: Value -> Parser [NF1 name f1 a1] #

(KnownSymbol f1, ToJSON a1) => ToJSON (NF1 name f1 a1) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

toJSON :: NF1 name f1 a1 -> Value #

toEncoding :: NF1 name f1 a1 -> Encoding #

toJSONList :: [NF1 name f1 a1] -> Value #

toEncodingList :: [NF1 name f1 a1] -> Encoding #

Generic (NF1 name f1 ty) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Associated Types

type Rep (NF1 name f1 ty) :: Type -> Type #

Methods

from :: NF1 name f1 ty -> Rep (NF1 name f1 ty) x #

to :: Rep (NF1 name f1 ty) x -> NF1 name f1 ty #

Show ty => Show (NF1 name f1 ty) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

Methods

showsPrec :: Int -> NF1 name f1 ty -> ShowS #

show :: NF1 name f1 ty -> String #

showList :: [NF1 name f1 ty] -> ShowS #

(KnownSymbol name, KnownSymbol f1, ToSchema a1) => ToSchema (NF1 name f1 a1) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF1 name f1 ty) Source # 
Instance details

Defined in DomainDriven.Internal.NamedFields

type Rep (NF1 name f1 ty) = D1 ('MetaData "NF1" "DomainDriven.Internal.NamedFields" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "NF1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ty)))

type ActionRunner m c = forall method a. MonadUnliftIO m => c 'ParamType method a -> m a Source #

type ActionHandler model event m c = forall method a. c 'ParamType method a -> HandlerType method model event m a Source #

Action handler

Expects a command, specified using a one-parameter GADT where the parameter specifies the return type.

When implementing the handler you have access to IO, but in order for the library to ensure thread safety of state updates you do not have direct access to the current state. Instead the handler returns a continuation, telling the library how to perform the evaluations on the model.

The resulting events will be applied to the current state so that no other command can run and generate events on the same state.

data HandlerType method model event m a where Source #

Constructors

Query :: (CanMutate method ~ 'False, GetModelAccess method ~ 'Direct) => (model -> m a) -> HandlerType method model event m a 
CbQuery :: (CanMutate method ~ 'False, GetModelAccess method ~ 'Callback) => (m model -> m a) -> HandlerType method model event m a 
Cmd :: (CanMutate method ~ 'True, GetModelAccess method ~ 'Direct) => (model -> m (model -> a, [event])) -> HandlerType method model event m a 
CbCmd :: (CanMutate method ~ 'True, GetModelAccess method ~ 'Callback) => ((forall x. (model -> m (model -> x, [event])) -> m x) -> m a) -> HandlerType method model event m a 

type family P (x :: ParamPart) (name :: Symbol) (a :: Type) where ... Source #

P is used for specifying the parameters of the model. The name will be used as the name in the JSON encoding or the query parameter of the generated server.

Equations

P 'ParamName name ty = Proxy name 
P 'ParamType name ty = ty 

data ParamPart Source #

Used as a parameter to the P type family on order to determine the focus.

Constructors

ParamName 
ParamType 

Instances

Instances details
Show ParamPart Source # 
Instance details

Defined in DomainDriven.Server.Class

type family CanMutate method :: Bool where ... Source #

Equations

CanMutate (RequestType a c (Verb 'GET code cts)) = 'False 
CanMutate (RequestType a c (Verb 'POST code cts)) = 'True 
CanMutate (RequestType a c (Verb 'PUT code cts)) = 'True 
CanMutate (RequestType a c (Verb 'PATCH code cts)) = 'True 
CanMutate (RequestType a c (Verb 'DELETE code cts)) = 'True 

type Action = ParamPart -> Type -> Type -> Type Source #

The kind of an Action, defined with a GADT as: data MyAction :: Action where ThisAction :: P x "count" Int -> MyAction x 'Cmd Int ThatAction :: P x "description" Text -> MyAction x 'Cmd ()

type Cmd = RequestType 'Direct '[JSON] (Verb 'POST 200 '[JSON]) Source #

data ModelAccess Source #

Constructors

Direct 
Callback 

data RequestType (accessType :: ModelAccess) (contentTypes :: [Type]) (verb :: Type -> Type) Source #

mapModel :: forall m event model0 model1 method a. Monad m => (model0 -> model1) -> HandlerType method model1 event m a -> HandlerType method model0 event m a Source #

mapEvent :: forall m e0 e1 a method model. Monad m => (e0 -> e1) -> HandlerType method model e0 m a -> HandlerType method model e1 m a Source #

mapResult :: Monad m => (r0 -> r1) -> HandlerType method model e m r0 -> HandlerType method model e m r1 Source #

runAction :: (MonadUnliftIO m, WriteModel p, model ~ Model p, event ~ Event p) => p -> ActionHandler model event m cmd -> cmd 'ParamType method ret -> m ret Source #

data ApiOptions Source #

Instances

Instances details
Generic ApiOptions Source # 
Instance details

Defined in DomainDriven.Server.Types

Associated Types

type Rep ApiOptions :: Type -> Type #

Show ApiOptions Source # 
Instance details

Defined in DomainDriven.Server.Types

type Rep ApiOptions Source # 
Instance details

Defined in DomainDriven.Server.Types

type Rep ApiOptions = D1 ('MetaData "ApiOptions" "DomainDriven.Server.Types" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "ApiOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "renameConstructor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (String -> String)) :*: (S1 ('MetaSel ('Just "typenameSeparator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "bodyNameBase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))))

class HasApiOptions (action :: Action) where Source #

Minimal complete definition

Nothing

data ServerConfig Source #

Configuration used to generate server This is expected to be generated by mkServerConfig. It is only explicit due to the GHC stage restrictions.

Instances

Instances details
Generic ServerConfig Source # 
Instance details

Defined in DomainDriven.Server.Config

Associated Types

type Rep ServerConfig :: Type -> Type #

Show ServerConfig Source # 
Instance details

Defined in DomainDriven.Server.Config

type Rep ServerConfig Source # 
Instance details

Defined in DomainDriven.Server.Config

type Rep ServerConfig = D1 ('MetaData "ServerConfig" "DomainDriven.Server.Config" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "ServerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "allApiOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map String ApiOptions))))

mkServerConfig :: String -> Q [Dec] Source #

Generate a server configuration and give it the specified name