swarm-0.3.0.0: 2D resource gathering game with programmable robots
CopyrightOndřej Šebek
LicenseBSD-3-Clause
Maintainerondras98@icloud.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Log

Description

A data type to represent in-game logs by robots.

Because of the use of system robots, we sometimes want to use special kinds of logs that will be shown to the player.

TODO: #1039 Currently we abuse this system for system logs, which is fun, but we should eventually make a dedicated SystemLogEntry type for RuntimeState message queue.

Synopsis

Documentation

data LogSource Source #

Source of the robot log.

Constructors

Said

Log produced by Say

Logged

Log produced by Log

ErrorTrace ErrorLevel

Log produced by an exception or system.

Instances

Instances details
FromJSON LogSource Source # 
Instance details

Defined in Swarm.Game.Log

ToJSON LogSource Source # 
Instance details

Defined in Swarm.Game.Log

Generic LogSource Source # 
Instance details

Defined in Swarm.Game.Log

Associated Types

type Rep LogSource :: Type -> Type #

Show LogSource Source # 
Instance details

Defined in Swarm.Game.Log

Eq LogSource Source # 
Instance details

Defined in Swarm.Game.Log

Ord LogSource Source # 
Instance details

Defined in Swarm.Game.Log

type Rep LogSource Source # 
Instance details

Defined in Swarm.Game.Log

type Rep LogSource = D1 ('MetaData "LogSource" "Swarm.Game.Log" "swarm-0.3.0.0-DptGDjHvXlqJcJyQcOsuxZ" 'False) (C1 ('MetaCons "Said" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Logged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorTrace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ErrorLevel))))

data ErrorLevel Source #

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

Constructors

Debug 
Warning 
Error 
Critical 

Instances

Instances details
FromJSON ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

ToJSON ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

Generic ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

Associated Types

type Rep ErrorLevel :: Type -> Type #

Show ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

Eq ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

Ord ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

type Rep ErrorLevel Source # 
Instance details

Defined in Swarm.Game.Log

type Rep ErrorLevel = D1 ('MetaData "ErrorLevel" "Swarm.Game.Log" "swarm-0.3.0.0-DptGDjHvXlqJcJyQcOsuxZ" 'False) ((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)))

Robot log entries

data LogEntry Source #

An entry in a robot's log.

Constructors

LogEntry 

Fields

Instances

Instances details
FromJSON LogEntry Source # 
Instance details

Defined in Swarm.Game.Log

ToJSON LogEntry Source # 
Instance details

Defined in Swarm.Game.Log

Generic LogEntry Source # 
Instance details

Defined in Swarm.Game.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.Game.Log

Eq LogEntry Source # 
Instance details

Defined in Swarm.Game.Log

Ord LogEntry Source # 
Instance details

Defined in Swarm.Game.Log

type Rep LogEntry Source # 
Instance details

Defined in Swarm.Game.Log