Nomyx-Language-0.3.2: Language to express rules for Nomic

Safe HaskellNone

Language.Nomyx.Expression

Contents

Description

This module containt the type definitions necessary to build a Nomic rule.

Synopsis

Documentation

Nomyx Expression

data Nomex a whereSource

A Nomex (Nomyx Expression) allows the players to write rules. | within the rules, you can access and modify the state of the game. | It is a compositional algebra defined with a GADT.

Variables

data V a Source

a container for a variable name and type

Constructors

V 

Fields

varName :: String
 

Instances

data Var Source

stores the variable's data

Constructors

forall a . (Typeable a, Show a, Eq a) => Var 

Instances

Events

data Player Source

events types

Constructors

Arrive 
Leave 

data Time Source

Instances

data Message m Source

Instances

data Input a Source

Instances

Typeable1 Input 
Eq e => Eq (Input e) 
Show a => Show (Input a) 

data InputForm a Source

Constructors

Radio [(a, String)] 
Text 
TextArea 
Button 
Checkbox [(a, String)] 

Instances

data Event a whereSource

events names

Instances

Typeable1 Event 
Eq e => Eq (Event e) 
Show a => Show (Event a) 

data EventData a whereSource

data associated with each events

Instances

data Status Source

Constructors

SActive 
SDeleted 

Instances

type Msg a = Event (Message a)Source

Outputs

Logs

data Log Source

Constructors

Log 

Instances

Rule

type RuleFunc = Nomex RuleRespSource

Type of a rule function.

data RuleResp Source

Return type of a rule function. it can be either nothing or another rule.

Constructors

Void 
Meta (Rule -> Nomex BoolResp) 

data BoolResp Source

Constructors

BoolResp Bool 
MsgResp (Msg Bool) 

Instances

data RuleStatus Source

the status of a rule.

Constructors

Active 
Pending 
Reject 

Player

Game

data Game Source

The state of the game: