Skip to content

Commit

Permalink
rename runTTerm -> runWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Jul 28, 2023
1 parent ee6e415 commit 32c12a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Swarm/Game/State.hs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ import Swarm.Game.Terrain (TerrainType (..))
import Swarm.Game.Universe as U
import Swarm.Game.World (Coords (..), WorldFun (..), locToCoords, worldFunFromArray)
import Swarm.Game.World qualified as W
import Swarm.Game.World.Eval (runTTerm)
import Swarm.Game.World.Eval (runWorld)
import Swarm.Game.World.Gen (Seed, findGoodOrigin)
import Swarm.Game.World.Typecheck (WorldMap)
import Swarm.Language.Capability (constCaps)
Expand Down Expand Up @@ -1255,7 +1255,7 @@ buildWorld WorldDescription {..} = (robots worldName, first fromEnum . wf)
worldArray = listArray ((ulr, ulc), (ulr + rs - 1, ulc + cs - 1)) (concat worldGrid)

dslWF, arrayWF :: Seed -> WorldFun TerrainType Entity
dslWF = maybe mempty ((applyWhen offsetOrigin findGoodOrigin .) . runTTerm) worldProg
dslWF = maybe mempty ((applyWhen offsetOrigin findGoodOrigin .) . runWorld) worldProg
arrayWF = const (worldFunFromArray worldArray)

wf = dslWF <> arrayWF
Expand Down
4 changes: 2 additions & 2 deletions src/Swarm/Game/World/Eval.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import Swarm.Util (acquireAllWithExt)
import System.FilePath (dropExtension, joinPath, splitPath)
import Witch (into)

runTTerm :: TTerm '[] (World CellVal) -> Seed -> WorldFun TerrainType Entity
runTTerm t seed = convert . interpBTerm seed . bracket $ t
runWorld :: TTerm '[] (World CellVal) -> Seed -> WorldFun TerrainType Entity
runWorld t seed = convert . interpBTerm seed . bracket $ t

-- runCTerm . compile seed . bracket

Expand Down

0 comments on commit 32c12a6

Please sign in to comment.