mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-11 14:46:33 +03:00
01c45ab968
Adds type synonym declarations to the language, like so: ``` tydef Maybe a = Unit + a end def lookdown : Cmd (Maybe Text) = scan down end > lookdown it2 : Maybe Text = inl () ``` `tydef` behaves very similarly to `def` except that it defines a new (parameterized) type instead of a new term. Note that higher-kinded types are not yet supported; for example we cannot say `tydef Foo f = Unit + f Int` (in fact this would be a syntax error since type variables cannot be at the head of an application). However there is nothing stopping us from adding that in the future; I just wanted to keep things simple for now. If you know of any scenario code that would be a good candidate for using type synonyms, let me know --- it would be nice to update a few scenarios as a better stress test of type synonyms before merging this. Closes #153.
5 lines
203 B
YAML
5 lines
203 B
YAML
loops:
|
|
build: cabal build -j -O0 all
|
|
test: cabal test -j -O0 --test-show-details=direct swarm:swarm-integration swarm:swarm-unit
|
|
unit: cabal test -j -O0 --test-show-details=direct swarm:swarm-unit
|