| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Game.Failure
Description
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.
Constructors
| AssetNotLoaded Asset FilePath LoadingFailure | |
| ScenarioNotFound FilePath | |
| OrderFileWarning FilePath OrderFileWarning | |
| CustomFailure Text |
Instances
| Show SystemFailure Source # | |
Defined in Swarm.Game.Failure Methods showsPrec :: Int -> SystemFailure -> ShowS # show :: SystemFailure -> String # showList :: [SystemFailure] -> ShowS # | |
| PrettyPrec SystemFailure Source # | |
Defined in Swarm.Game.Failure Methods 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.
Constructors
| Achievement | |
| Data AssetData | |
| History | |
| Save |
Enumeration type to distinguish between directories and files.
data LoadingFailure Source #
An error that occurred while attempting to load some kind of asset.
Constructors
| 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 Methods showsPrec :: Int -> LoadingFailure -> ShowS # show :: LoadingFailure -> String # showList :: [LoadingFailure] -> ShowS # | |
| PrettyPrec LoadingFailure Source # | |
Defined in Swarm.Game.Failure Methods prettyPrec :: Int -> LoadingFailure -> Doc ann Source # | |
data OrderFileWarning Source #
A warning that arose while processing an 00-ORDER.txt file.
Constructors
| NoOrderFile | |
| MissingFiles (NonEmpty FilePath) | |
| DanglingFiles (NonEmpty FilePath) |
Instances
| Show OrderFileWarning Source # | |
Defined in Swarm.Game.Failure Methods showsPrec :: Int -> OrderFileWarning -> ShowS # show :: OrderFileWarning -> String # showList :: [OrderFileWarning] -> ShowS # | |
| Eq OrderFileWarning Source # | |
Defined in Swarm.Game.Failure Methods (==) :: OrderFileWarning -> OrderFileWarning -> Bool # (/=) :: OrderFileWarning -> OrderFileWarning -> Bool # | |
| PrettyPrec OrderFileWarning Source # | |
Defined in Swarm.Game.Failure Methods prettyPrec :: Int -> OrderFileWarning -> Doc ann Source # | |