License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A data type to represent system failures (as distinct from robot program failures).
These failures are often not fatal and serve to create common infrastructure for logging.
Synopsis
- data SystemFailure
- data AssetData
- data Asset
- = Achievement
- | Data AssetData
- | History
- | Save
- data Entry
- data LoadingFailure
- data OrderFileWarning
Documentation
data SystemFailure Source #
An enumeration of various types of failures (errors or warnings) that can occur.
AssetNotLoaded Asset FilePath LoadingFailure | |
ScenarioNotFound FilePath | |
OrderFileWarning FilePath OrderFileWarning | |
CustomFailure Text |
Instances
Show SystemFailure Source # | |
Defined in Swarm.Game.Failure showsPrec :: Int -> SystemFailure -> ShowS # show :: SystemFailure -> String # showList :: [SystemFailure] -> ShowS # | |
PrettyPrec SystemFailure Source # | |
Defined in Swarm.Game.Failure prettyPrec :: Int -> SystemFailure -> Doc ann Source # |
Enumeration of various assets we can attempt to load.
Overarching enumeration of various assets we can attempt to load.
Enumeration type to distinguish between directories and files.
data LoadingFailure Source #
An error that occurred while attempting to load some kind of asset.
DoesNotExist Entry | |
EntryNot Entry | |
CanNotParseYaml ParseException | |
CanNotParseMegaparsec (ParseErrorBundle Text Void) | |
DoesNotTypecheck Text | |
Duplicate AssetData Text | |
CustomMessage Text |
Instances
Show LoadingFailure Source # | |
Defined in Swarm.Game.Failure showsPrec :: Int -> LoadingFailure -> ShowS # show :: LoadingFailure -> String # showList :: [LoadingFailure] -> ShowS # | |
PrettyPrec LoadingFailure Source # | |
Defined in Swarm.Game.Failure prettyPrec :: Int -> LoadingFailure -> Doc ann Source # |
data OrderFileWarning Source #
A warning that arose while processing an 00-ORDER.txt
file.
Instances
Show OrderFileWarning Source # | |
Defined in Swarm.Game.Failure showsPrec :: Int -> OrderFileWarning -> ShowS # show :: OrderFileWarning -> String # showList :: [OrderFileWarning] -> ShowS # | |
Eq OrderFileWarning Source # | |
Defined in Swarm.Game.Failure (==) :: OrderFileWarning -> OrderFileWarning -> Bool # (/=) :: OrderFileWarning -> OrderFileWarning -> Bool # | |
PrettyPrec OrderFileWarning Source # | |
Defined in Swarm.Game.Failure prettyPrec :: Int -> OrderFileWarning -> Doc ann Source # |