app

Safe Haskell None
Language Haskell2010

ServerMessages

Documentation

type UserName = Text #

data InMessage #

Instances
Eq InMessage #  
Instance details

Defined in ServerMessages

Methods

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

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

Show InMessage #  
Instance details

Defined in ServerMessages

Generic InMessage #  
Instance details

Defined in ServerMessages

Associated Types

type Rep InMessage :: Type -> Type #

Methods

from :: InMessage -> Rep InMessage x #

to :: Rep InMessage x -> InMessage #

ToJSON InMessage #  
Instance details

Defined in ServerMessages

FromJSON InMessage #  
Instance details

Defined in ServerMessages

type Rep InMessage #  
Instance details

Defined in ServerMessages

type Rep InMessage = D1 (MetaData "InMessage" "ServerMessages" "main" False) ((C1 (MetaCons "CreateUser" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UserName)) :+: C1 (MetaCons "InviteUser" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UserName))) :+: (C1 (MetaCons "DropInvitation" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "AcceptInvitation" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "RejectInvitation" PrefixI False) (U1 :: Type -> Type))))

data UserCreationError #

Constructors

UsernameAlreadyExists  
Instances
Eq UserCreationError #  
Instance details

Defined in ServerMessages

Show UserCreationError #  
Instance details

Defined in ServerMessages

Generic UserCreationError #  
Instance details

Defined in ServerMessages

Associated Types

type Rep UserCreationError :: Type -> Type #

ToJSON UserCreationError #  
Instance details

Defined in ServerMessages

FromJSON UserCreationError #  
Instance details

Defined in ServerMessages

type Rep UserCreationError #  
Instance details

Defined in ServerMessages

type Rep UserCreationError = D1 (MetaData "UserCreationError" "ServerMessages" "main" False) (C1 (MetaCons "UsernameAlreadyExists" PrefixI False) (U1 :: Type -> Type))

data OutMessage #

Instances
Eq OutMessage #  
Instance details

Defined in ServerMessages

Show OutMessage #  
Instance details

Defined in ServerMessages

Generic OutMessage #  
Instance details

Defined in ServerMessages

Associated Types

type Rep OutMessage :: Type -> Type #

ToJSON OutMessage #  
Instance details

Defined in ServerMessages

FromJSON OutMessage #  
Instance details

Defined in ServerMessages

type Rep OutMessage #  
Instance details

Defined in ServerMessages

type Rep OutMessage = D1 (MetaData "OutMessage" "ServerMessages" "main" False) (((C1 (MetaCons "ParseError" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "UnexpectedMessage" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "UserCreated" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "UserCreationFailed" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UserCreationError)) :+: C1 (MetaCons "NewUserList" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [UserName]))) :+: (C1 (MetaCons "UserBusy" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "InvitationSent" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "InvitationRejected" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "InvitationAccepted" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "InvitationDropAck" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "IncomingInvitation" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UserName)))) :+: ((C1 (MetaCons "IncomingInvitationCancelled" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "IncomingInvitationRejectionAck" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "IncomingInvitationAcceptanceAck" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "OtherPlayerLeftGame" PrefixI False) (U1 :: Type -> Type)))))