Skip to content

Commit 27f3c37

Browse files
Kleidukoschessai
andauthored
Support GHC 8.10 to 9.8 (#87)
* Support GHC 8.10 to 9.8 * Bound bump and CPP for JavaScriptFFI Co-Authored-By: chessai <[email protected]> --------- Co-authored-by: chessai <[email protected]>
1 parent 04a6816 commit 27f3c37

File tree

5 files changed

+69
-4
lines changed

5 files changed

+69
-4
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
# Trigger the workflow on push or pull request, but only for the main branch
4+
on:
5+
pull_request:
6+
push:
7+
branches: ["main"]
8+
9+
jobs:
10+
generate-matrix:
11+
name: "Generate matrix from cabal"
12+
outputs:
13+
matrix: ${{ steps.set-matrix.outputs.matrix }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Extract the tested GHC versions
17+
id: set-matrix
18+
uses: kleidukos/[email protected]
19+
with:
20+
cabal-file: chronos.cabal
21+
ubuntu: true
22+
version: 0.1.6.0
23+
tests:
24+
name: ${{ matrix.ghc }} on ${{ matrix.os }}
25+
needs: generate-matrix
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
29+
steps:
30+
- name: Checkout base repo
31+
uses: actions/checkout@v4
32+
- name: Set up Haskell
33+
id: setup-haskell
34+
uses: haskell-actions/setup@v2
35+
with:
36+
ghc-version: ${{ matrix.ghc }}
37+
cabal-version: 'latest'
38+
- name: Configure
39+
run: cabal configure --enable-tests
40+
- name: Freeze
41+
run: cabal freeze
42+
- name: Cache
43+
uses: actions/[email protected]
44+
with:
45+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
46+
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
47+
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
48+
- name: Build
49+
run: cabal new-build
50+
- name: Test
51+
run: cabal new-test all

chronos.cabal

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ maintainer:
3535
copyright: 2016 Andrew Martin
3636
category: Data, Time, Parsing, Development
3737
build-type: Simple
38+
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.1
3839

3940
library
4041
hs-source-dirs: src
@@ -48,16 +49,16 @@ library
4849
build-depends:
4950
, aeson >= 1.1 && < 2.3
5051
, attoparsec >= 0.13 && < 0.15
51-
, base >= 4.14 && < 4.19
52-
, bytestring >= 0.10 && < 0.12
52+
, base >= 4.14 && < 4.20
53+
, bytestring >= 0.10 && < 0.13
5354
, deepseq >= 1.4.4.0
5455
, hashable >= 1.2 && < 1.5
5556
, primitive >= 0.6.4 && < 0.10
5657
, semigroups >= 0.16 && < 0.21
5758
, text >= 1.2 && < 1.3 || >= 2.0 && < 2.2
5859
, torsor >= 0.1 && < 0.2
5960
, vector >= 0.11 && < 0.14
60-
, bytebuild >= 0.3.8 && < 0.4
61+
, bytebuild >= 0.3.14 && < 0.4
6162
, bytesmith >= 0.3.7 && < 0.4
6263
, byteslice >= 0.2.5.2 && <0.3
6364
, text-short >= 0.1.3 && <0.2

src/Chronos.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# language BangPatterns #-}
22
{-# language CPP #-}
3+
{-# language DataKinds #-}
34
{-# language DeriveGeneric #-}
45
{-# language GeneralizedNewtypeDeriving #-}
56
{-# language LambdaCase #-}
@@ -11,7 +12,6 @@
1112
{-# language ScopedTypeVariables #-}
1213
{-# language TypeApplications #-}
1314
{-# language TypeFamilies #-}
14-
{-# language TypeInType #-}
1515
{-# language UnboxedTuples #-}
1616

1717
{-| Chronos is a performance-oriented time library for Haskell, with a

src/Chronos/Internal/CTimespec.hs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{-# LANGUAGE CPP #-}
2+
3+
#if defined(ghcjs_HOST_OS)
24
{-# LANGUAGE JavaScriptFFI #-}
5+
#endif
36

47
{-# OPTIONS_HADDOCK hide #-} -- for doctests
58

0 commit comments

Comments
 (0)