Skip to content

Commit

Permalink
Update to new brick EventM API (#583)
Browse files Browse the repository at this point in the history
- closes #561
  • Loading branch information
xsebek authored Jul 27, 2022
1 parent b0ad993 commit 0150b8a
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 354 deletions.
3 changes: 2 additions & 1 deletion .github/deadpendency.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ignore-failures:
haskell:
# there is no new alternative
- noise
- hsnoise
# does not need any new updates
- tasty-expected-failure
- fused-effects-lens
- dotgen
# exports GHC capabilities and does not need updates
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' '--config=cabal.haskell-ci' 'swarm.cabal'
# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' '--copy-fields=all'
#
# To regenerate the script (for example after adjusting tested-with) run
#
Expand All @@ -19,7 +19,7 @@
#
# version: 0.15.20220531
#
# REGENDATA ("0.15.20220531",["github","--config=cabal.haskell-ci","swarm.cabal"])
# REGENDATA ("0.15.20220531",["github","--config=cabal.haskell-ci","cabal.project","--copy-fields=all"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -204,6 +204,16 @@ jobs:
echo "package swarm" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
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
flags: +ci
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(swarm)$/; }' >> cabal.project.local
Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ source-repository-package
location: https://github.com/colinhect/hsnoise
tag: 4ccff11dea7e8d94e6a5fcaf8f43857bd65bd72d

source-repository-package
type: git
location: https://github.com/jtdaugherty/brick
tag: dee90efa8cde1755f435c1f7dd9b6828b1bd0089

packages: .
4 changes: 2 additions & 2 deletions src/Swarm/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ app =
{ appDraw = drawUI
, appChooseCursor = chooseCursor
, appHandleEvent = handleEvent
, appStartEvent = (<$ enablePasteMode)
, appStartEvent = enablePasteMode
, appAttrMap = const swarmAttrMap
}

Expand Down Expand Up @@ -68,7 +68,7 @@ appMain seed scenario toRun cheat = do
void $ customMain initialVty buildVty (Just chan) app s

-- | If available for the terminal emulator, enable bracketed paste mode.
enablePasteMode :: EventM s ()
enablePasteMode :: EventM n s ()
enablePasteMode = do
vty <- getVtyHandle
let output = V.outputIface vty
Expand Down
Loading

0 comments on commit 0150b8a

Please sign in to comment.