mirror of
https://github.com/swarm-game/swarm.git
synced 2024-08-16 18:10:23 +03:00
update to brick-1.0
(#641)
* Update to `brick-1.0` * Test with GHC 9.2.4
This commit is contained in:
parent
5c0ef9d12d
commit
e6defd44b1
19
.github/workflows/haskell-ci.yml
vendored
19
.github/workflows/haskell-ci.yml
vendored
@ -17,9 +17,9 @@
|
||||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
# version: 0.15.20220531
|
||||
# version: 0.15.20220808
|
||||
#
|
||||
# REGENDATA ("0.15.20220531",["github","--config=cabal.haskell-ci","cabal.project","--copy-fields=all"])
|
||||
# REGENDATA ("0.15.20220808",["github","--config=cabal.haskell-ci","cabal.project","--copy-fields=all"])
|
||||
#
|
||||
name: Haskell-CI
|
||||
on:
|
||||
@ -59,9 +59,9 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- compiler: ghc-9.2.3
|
||||
- compiler: ghc-9.2.4
|
||||
compilerKind: ghc
|
||||
compilerVersion: 9.2.3
|
||||
compilerVersion: 9.2.4
|
||||
setup-method: ghcup
|
||||
allow-failure: false
|
||||
- compiler: ghc-9.0.2
|
||||
@ -81,10 +81,10 @@ jobs:
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
|
||||
mkdir -p "$HOME/.ghcup/bin"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
|
||||
chmod a+x "$HOME/.ghcup/bin/ghcup"
|
||||
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
|
||||
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
env:
|
||||
HCKIND: ${{ matrix.compilerKind }}
|
||||
HCNAME: ${{ matrix.compiler }}
|
||||
@ -209,11 +209,6 @@ jobs:
|
||||
location: https://github.com/colinhect/hsnoise
|
||||
tag: 4ccff11dea7e8d94e6a5fcaf8f43857bd65bd72d
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
location: https://github.com/jtdaugherty/brick
|
||||
tag: dee90efa8cde1755f435c1f7dd9b6828b1bd0089
|
||||
|
||||
flags: +ci
|
||||
EOF
|
||||
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(swarm)$/; }' >> cabal.project.local
|
||||
|
@ -11,6 +11,7 @@ queue_rules:
|
||||
- -files~=^[^/]*\.yaml$
|
||||
- -files~=^data/.*\.yaml$
|
||||
- and:
|
||||
- check-success=Haskell-CI - Linux - ghc-9.2.4
|
||||
- check-success=Haskell-CI - Linux - ghc-9.0.2
|
||||
- check-success=Haskell-CI - Linux - ghc-8.10.7
|
||||
|
||||
@ -36,7 +37,7 @@ pull_request_rules:
|
||||
- -files~=^[^/]*\.yaml$
|
||||
- -files~=^data/.*\.yaml$
|
||||
- and:
|
||||
- check-success=Haskell-CI - Linux - ghc-9.2.3
|
||||
- check-success=Haskell-CI - Linux - ghc-9.2.4
|
||||
- check-success=Haskell-CI - Linux - ghc-9.0.2
|
||||
- check-success=Haskell-CI - Linux - ghc-8.10.7
|
||||
- label=merge me
|
||||
|
@ -1,11 +1,9 @@
|
||||
-- If you edit this file, be sure to regenerate the CI configuration
|
||||
-- by running 'haskell-ci regenerate'.
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
location: https://github.com/colinhect/hsnoise
|
||||
tag: 4ccff11dea7e8d94e6a5fcaf8f43857bd65bd72d
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
location: https://github.com/jtdaugherty/brick
|
||||
tag: dee90efa8cde1755f435c1f7dd9b6828b1bd0089
|
||||
|
||||
packages: .
|
||||
|
@ -1,5 +1,3 @@
|
||||
-----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
|
||||
@ -87,14 +85,14 @@ entityAttr :: AttrName
|
||||
entityAttr = fst $ head worldAttributes
|
||||
|
||||
worldPrefix :: AttrName
|
||||
worldPrefix = "world"
|
||||
worldPrefix = attrName "world"
|
||||
|
||||
-- | Colors of entities in the world.
|
||||
--
|
||||
-- Also used to color messages, so water is special and excluded.
|
||||
worldAttributes :: [(AttrName, V.Attr)]
|
||||
worldAttributes =
|
||||
bimap (worldPrefix <>) fg
|
||||
bimap ((worldPrefix <>) . attrName) fg
|
||||
<$> [ ("entity", V.white)
|
||||
, ("device", V.brightYellow)
|
||||
, ("plant", V.green)
|
||||
@ -118,7 +116,7 @@ worldAttributes =
|
||||
]
|
||||
|
||||
terrainPrefix :: AttrName
|
||||
terrainPrefix = "terrain"
|
||||
terrainPrefix = attrName "terrain"
|
||||
|
||||
terrainAttr :: [(AttrName, V.Attr)]
|
||||
terrainAttr =
|
||||
@ -130,16 +128,16 @@ terrainAttr =
|
||||
|
||||
-- | The default robot attribute.
|
||||
robotAttr :: AttrName
|
||||
robotAttr = "robot"
|
||||
robotAttr = attrName "robot"
|
||||
|
||||
dirtAttr, grassAttr, stoneAttr, iceAttr, waterAttr, rockAttr, plantAttr :: AttrName
|
||||
dirtAttr = terrainPrefix <> "dirt"
|
||||
grassAttr = terrainPrefix <> "grass"
|
||||
stoneAttr = terrainPrefix <> "stone"
|
||||
iceAttr = terrainPrefix <> "ice"
|
||||
waterAttr = worldPrefix <> "water"
|
||||
rockAttr = worldPrefix <> "rock"
|
||||
plantAttr = worldPrefix <> "plant"
|
||||
dirtAttr = terrainPrefix <> attrName "dirt"
|
||||
grassAttr = terrainPrefix <> attrName "grass"
|
||||
stoneAttr = terrainPrefix <> attrName "stone"
|
||||
iceAttr = terrainPrefix <> attrName "ice"
|
||||
waterAttr = worldPrefix <> attrName "water"
|
||||
rockAttr = worldPrefix <> attrName "rock"
|
||||
plantAttr = worldPrefix <> attrName "plant"
|
||||
|
||||
-- | Some defined attribute names used in the Swarm TUI.
|
||||
highlightAttr
|
||||
@ -147,17 +145,17 @@ highlightAttr
|
||||
, infoAttr
|
||||
, defAttr ::
|
||||
AttrName
|
||||
highlightAttr = "highlight"
|
||||
notifAttr = "notif"
|
||||
infoAttr = "info"
|
||||
defAttr = "def"
|
||||
highlightAttr = attrName "highlight"
|
||||
notifAttr = attrName "notif"
|
||||
infoAttr = attrName "info"
|
||||
defAttr = attrName "def"
|
||||
|
||||
-- | Some basic colors used in TUI.
|
||||
redAttr, greenAttr, blueAttr, yellowAttr :: AttrName
|
||||
redAttr = "red"
|
||||
greenAttr = "green"
|
||||
blueAttr = "blue"
|
||||
yellowAttr = "yellow"
|
||||
redAttr = attrName "red"
|
||||
greenAttr = attrName "green"
|
||||
blueAttr = attrName "blue"
|
||||
yellowAttr = attrName "yellow"
|
||||
|
||||
instance ToJSON AttrName where
|
||||
toJSON = toJSON . head . attrNameComponents
|
||||
|
@ -4,8 +4,8 @@ extra-deps:
|
||||
- base-orphans-0.8.6
|
||||
- git: https://github.com/colinhect/hsnoise
|
||||
commit: 4ccff11dea7e8d94e6a5fcaf8f43857bd65bd72d
|
||||
- git: https://github.com/jtdaugherty/brick
|
||||
commit: dee90efa8cde1755f435c1f7dd9b6828b1bd0089
|
||||
- brick-1.0@sha256:99242c47aa2fd08424445de9c4437405098dcda5ae74d558648eadd6b069062c,17793
|
||||
- bimap-0.5.0@sha256:aba506d02a1c93fc2b50dcbe728d2a4d07cca89b7033945418061a0b08576ebd,1889
|
||||
- simple-enumeration-0.2.1@sha256:8625b269c1650d3dd0e3887351c153049f4369853e0d525219e07480ea004b9f,1178
|
||||
- fused-effects-1.1.1.1@sha256:c029c5fb0b2154281221a71ff25709d2a11347fe061fa8c2398e7fe52a16008d,4932
|
||||
- fused-effects-lens-1.2.0.1@sha256:675fddf183215b6f3c1f2a0823359a648756435fd1966284e61830ec28ad61fa,1466
|
||||
|
@ -18,7 +18,7 @@ maintainer: byorgey@gmail.com
|
||||
bug-reports: https://github.com/swarm-game/swarm/issues
|
||||
copyright: Brent Yorgey 2021
|
||||
category: Game
|
||||
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.3
|
||||
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.4
|
||||
extra-source-files: CHANGELOG.md
|
||||
example/*.sw
|
||||
editors/emacs/*.el
|
||||
@ -125,7 +125,7 @@ library
|
||||
build-depends: base >= 4.14 && < 4.17,
|
||||
aeson >= 2 && < 2.1,
|
||||
array >= 0.5.4 && < 0.6,
|
||||
brick >= 0.73 && < 0.74,
|
||||
brick >= 1.0 && < 1.1,
|
||||
clock >= 0.8.2 && < 0.9,
|
||||
containers >= 0.6.2 && < 0.7,
|
||||
directory >= 1.3 && < 1.4,
|
||||
|
Loading…
Reference in New Issue
Block a user