swarm/test/unit
Karl Ostmo ca4a2b809d
topography sublibrary (#1836)
Towards #1043.

The eventual goal of this sublibrary split is to have a self contained library that can compose 2D grids of arbitrary content (perhaps colored pixels, or boolean values).  This could be useful outside of the `swarm` game.

I would also like to write unit tests for the structure recognizer that are independent of the `Entity` type.

# Major Changes

## Direction module
* Moved `Swarm.Language.Syntax.Direction` to `swarm-util`, since both `swarm-lang` and `swarm-topology` depend on it, but not on each other.
* Removed the re-export of direction things from `Swarm.Language.Syntax`

## Structure module

The `Swarm.Game.Scenario.Topography.Structure` module has been split into two:
* `Swarm.Game.Scenario.Topography.Structure`
* `Swarm.Game.Scenario.Topography.Structure.Type`

The former retains the YAML parsing logic.  The latter is agnostic of `Enitiy` type and the palette .
At some future point, I might want to move the YAML parsing to this sublibrary while still retaining independence of `Entity` type.

## Structure recognizer

The structure recognizer is independent of the content of Cells (i.e. it does not need to know what an `Entity` is), except:
1. during initialization
2. when retrieving the original cell content after recognition

Type parameters for three kinds of data have been added to the recognizer:
1. `Cell`/`PCell`
2. `Entity`
3. `EntityName`

Eventually it may be possible to eliminate one or two of these type parameters, with some refactoring.
2024-06-02 20:53:34 +00:00
..
Main.hs structure grid expansion (#1826) 2024-05-26 01:25:54 +00:00
TestBoolExpr.hs prefer dots over dollars (#1190) 2023-04-02 20:24:03 +00:00
TestCommand.hs topography sublibrary (#1836) 2024-06-02 20:53:34 +00:00
TestEval.hs Require types to start with an uppercase letter (#1583) 2024-05-21 04:16:32 +00:00
TestInventory.hs Capability exercise cost (#1777) 2024-04-25 19:39:54 +00:00
TestLanguagePipeline.hs Type synonyms (#1865) 2024-06-01 21:09:50 +00:00
TestLSP.hs Add format --v0.5 option to port code from older syntax (#1851) 2024-05-22 00:09:31 +00:00
TestNotification.hs Improve separation of engine and scenario sublibraries (#1743) 2024-01-26 00:48:20 +00:00
TestOrdering.hs Structure browser and recognizer (#1579) 2023-11-08 06:44:27 +00:00
TestOverlay.hs structure grid expansion (#1826) 2024-05-26 01:25:54 +00:00
TestParse.hs Insert parsed comments back into the AST and pretty-print with comments (#1845) 2024-05-14 11:32:03 +00:00
TestPedagogy.hs Remove Benchmark dependence on AppState and TUI (#1746) 2024-01-26 17:56:39 +00:00
TestPretty.hs Type synonyms (#1865) 2024-06-01 21:09:50 +00:00
TestRecipeCoverage.hs Capability exercise cost (#1777) 2024-04-25 19:39:54 +00:00
TestRepl.hs Require types to start with an uppercase letter (#1583) 2024-05-21 04:16:32 +00:00
TestScoring.hs Type synonyms (#1865) 2024-06-01 21:09:50 +00:00
TestUtil.hs extensible terrain (#1775) 2024-02-29 06:22:21 +00:00