swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Log

Description

A data type to represent log messages, both for robot logs and the system log.

Synopsis

Documentation

data Severity Source #

Severity of the error - critical errors are bugs and should be reported as Issues.

Constructors

Info 
Debug 
Warning 
Error 
Critical 

Instances

Instances details
FromJSON Severity Source # 
Instance details

Defined in Swarm.Log

ToJSON Severity Source # 
Instance details

Defined in Swarm.Log

Generic Severity Source # 
Instance details

Defined in Swarm.Log

Associated Types

type Rep Severity :: Type -> Type #

Methods

from :: Severity -> Rep Severity x #

to :: Rep Severity x -> Severity #

Show Severity Source # 
Instance details

Defined in Swarm.Log

Eq Severity Source # 
Instance details

Defined in Swarm.Log

Ord Severity Source # 
Instance details

Defined in Swarm.Log

type Rep Severity Source # 
Instance details

Defined in Swarm.Log

type Rep Severity = D1 ('MetaData "Severity" "Swarm.Log" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) ((C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type))))

data RobotLogSource Source #

How a robot log entry was produced.

Constructors

Said

Produced by Say

Logged

Produced by Log

RobotError

Produced as the result of an error.

Instances

Instances details
FromJSON RobotLogSource Source # 
Instance details

Defined in Swarm.Log

ToJSON RobotLogSource Source # 
Instance details

Defined in Swarm.Log

Generic RobotLogSource Source # 
Instance details

Defined in Swarm.Log

Associated Types

type Rep RobotLogSource :: Type -> Type #

Show RobotLogSource Source # 
Instance details

Defined in Swarm.Log

Eq RobotLogSource Source # 
Instance details

Defined in Swarm.Log

Ord RobotLogSource Source # 
Instance details

Defined in Swarm.Log

type Rep RobotLogSource Source # 
Instance details

Defined in Swarm.Log

type Rep RobotLogSource = D1 ('MetaData "RobotLogSource" "Swarm.Log" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) (C1 ('MetaCons "Said" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Logged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RobotError" 'PrefixI 'False) (U1 :: Type -> Type)))

data LogSource Source #

Source of a log entry.

Constructors

RobotLog RobotLogSource Int (Cosmic Location)

Log produced by a robot. Stores information about which command was used and the ID and location of the producing robot.

SystemLog

Log produced by an exception or system.

Instances

Instances details
FromJSON LogSource Source # 
Instance details

Defined in Swarm.Log

ToJSON LogSource Source # 
Instance details

Defined in Swarm.Log

Generic LogSource Source # 
Instance details

Defined in Swarm.Log

Associated Types

type Rep LogSource :: Type -> Type #

Show LogSource Source # 
Instance details

Defined in Swarm.Log

Eq LogSource Source # 
Instance details

Defined in Swarm.Log

Ord LogSource Source # 
Instance details

Defined in Swarm.Log

type Rep LogSource Source # 
Instance details

Defined in Swarm.Log

data LogEntry Source #

A log entry.

Constructors

LogEntry 

Fields

Instances

Instances details
FromJSON LogEntry Source # 
Instance details

Defined in Swarm.Log

ToJSON LogEntry Source # 
Instance details

Defined in Swarm.Log

Generic LogEntry Source # 
Instance details

Defined in Swarm.Log

Associated Types

type Rep LogEntry :: Type -> Type #

Methods

from :: LogEntry -> Rep LogEntry x #

to :: Rep LogEntry x -> LogEntry #

Show LogEntry Source # 
Instance details

Defined in Swarm.Log

Eq LogEntry Source # 
Instance details

Defined in Swarm.Log

Ord LogEntry Source # 
Instance details

Defined in Swarm.Log

type Rep LogEntry Source # 
Instance details

Defined in Swarm.Log