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

Swarm.Game.World.Load

Description

Loading world descriptions from `worlds/*.world`.

Synopsis

Documentation

loadWorlds :: (Has (Accum (Seq SystemFailure)) sig m, Has (Lift IO) sig m) => EntityMap -> m WorldMap Source #

Load and typecheck all world descriptions from `worlds/*.world`. Emit a warning for each one which fails to parse or typecheck.

loadWorld :: Has (Throw SystemFailure) sig m => FilePath -> EntityMap -> (FilePath, String) -> m (Text, Some (TTerm '[])) Source #

Load a file containing a world DSL term, throwing an exception if it fails to parse or typecheck.

stripDir :: FilePath -> FilePath -> FilePath Source #

Strip a leading directory from a FilePath.