Skip to content

Commit

Permalink
Merge pull request #276 from HeinrichApfelmus/HeinrichApfelmus/bump-deps
Browse files Browse the repository at this point in the history
Bump dependencies, support GHC 9.6.3
  • Loading branch information
HeinrichApfelmus authored Nov 9, 2023
2 parents 142ee61 + cb7683d commit ea2de29
Show file tree
Hide file tree
Showing 25 changed files with 223 additions and 358 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/build-haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Build cabal project
on:
workflow_dispatch:
pull_request:
types:
- synchronize
- opened
- reopened
merge_group:
push:
branches:
- main
schedule:
# Run once per day (at UTC 18:00) to maintain cache:
- cron: 0 18 * * *
jobs:
build:
name: ${{ matrix.os }}-ghc-${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-failure }}
env:
cabal-build-dir: b
strategy:
matrix:
allow-failure:
- false
os:
- ubuntu-latest
cabal:
- 3.8.1.0
ghc:
- 8.0.2
- 8.2.2
- 8.4.4
- 8.6.5
- 8.8.4
- 8.10.7
- 9.2.8
- 9.4.7
- 9.6.3
include:
- ghc: 9.8.1
os: ubuntu-latest
cabal: 3.8.1.0
allow-failure: true
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Environment
uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Configure
run: >
cabal configure
--builddir=${{ env.cabal-build-dir }}
--enable-tests
--enable-benchmarks
--enable-documentation
--test-show-details=direct
--write-ghc-environment-files=always
- name: Freeze
run: >
cabal freeze
--builddir=${{ env.cabal-build-dir }}
- name: Cache
uses: actions/cache@v3
env:
hash: ${{ hashFiles('cabal.project.freeze') }}
with:
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-${{ env.hash }}
restore-keys: |
${{ matrix.os }}-ghc-${{ matrix.ghc }}-
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
${{ env.cabal-build-dir }}
- name: Dependencies
run: >
cabal build all
--builddir=${{ env.cabal-build-dir }}
--only-dependencies
- name: Build
run: >
cabal build all
--builddir=${{ env.cabal-build-dir }}
--enable-tests
--enable-benchmarks
--ghc-options=-Wall
- name: Test
run: >
cabal test all
--builddir=${{ env.cabal-build-dir }}
- name: Benchmark
run: >
cabal bench all
--builddir=${{ env.cabal-build-dir }}
|| true
243 changes: 0 additions & 243 deletions .github/workflows/haskell-ci.yml

This file was deleted.

7 changes: 2 additions & 5 deletions src/Foreign/JavaScript.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ module Foreign.JavaScript (
debug, timestamp,
) where

import Control.Concurrent.STM as STM
import Control.Monad (unless)
import qualified Data.Aeson as JSON
import Foreign.JavaScript.CallBuffer
import Foreign.JavaScript.EventLoop
import Foreign.JavaScript.Marshal
Expand All @@ -49,12 +46,12 @@ serve
:: Config -- ^ Configuration options.
-> (Window -> IO ()) -- ^ Initialization whenever a client connects.
-> IO ()
serve config init = httpComm config $ eventLoop $ \w -> do
serve config initialize = httpComm config $ eventLoop $ \w -> do
setCallBufferMode w (jsCallBufferMode config)
runFunction w $
ffi "connection.setReloadOnDisconnect(%1)" $ jsWindowReloadOnDisconnect config
flushCallBuffer w -- make sure that all `runEval` commands are executed
init w
initialize w
flushCallBuffer w -- make sure that all `runEval` commands are executed

{-----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit ea2de29

Please sign in to comment.