Skip to content

Commit

Permalink
Add ghc-9.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbastiaan authored and cchalmers committed Nov 30, 2023
1 parent 17526d5 commit 3732d4c
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 151 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: CI

# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -18,7 +16,7 @@ jobs:
container:
image: 'nixos/nix:2.3.6'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Build
run: |
Expand All @@ -31,17 +29,18 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
cabal: ["3.2"]
cabal: ["3.6"]
ghc:
- "8.6.5"
- "8.10.7"
- "9.0.2"
- "9.2.8"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: haskell/actions/setup@v1
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
Expand All @@ -50,21 +49,22 @@ jobs:

- name: Freeze
run: |
cabal update
cabal freeze
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze', 'cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal build all --write-ghc-environment-files=always
ghc -iexample Example
ghc -iexample Testing
- name: Test
run: |
Expand Down
6 changes: 6 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
packages: .

source-repository-package
type: git
location: https://github.com/clash-lang/clash-compiler.git
tag: 5b055fb3fcdaf6e2b89cb86486d7280fc781fa84
subdir: clash-prelude
16 changes: 12 additions & 4 deletions circuit-notation.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,29 @@ cabal-version: >=1.10

library
exposed-modules: CircuitNotation Circuit
-- other-modules:

if impl(ghc < 9.2)
other-modules:
GHC.Types.Unique.Map

other-modules:
GHC.Types.Unique.Map.Extra

-- other-extensions:
build-depends:
base >=4.12
, clash-prelude >= 1.0
, containers
, data-default
, ghc (>=8.6 && <8.8) || (>=8.10 && < 9.2)
, syb
, ghc (>=8.6 && <8.8) || (>=8.10 && < 9.4)
, lens
, mtl
, pretty
, parsec
, pretty
, pretty-show
, syb
, template-haskell
, unordered-containers
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
Expand Down
22 changes: 12 additions & 10 deletions example/Testing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
For testing the circuit notation.
-}

{-# LANGUAGE Arrows #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE GADTs #-}
-- {-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}

-- For testing:
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ < 810
{-# LANGUAGE Arrows #-}
#endif
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds#-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ScopedTypeVariables #-}

{-# OPTIONS -fplugin=CircuitNotation #-}
{-# OPTIONS -Wno-unused-local-binds #-}
{-# OPTIONS -Wno-missing-signatures #-}

module Example where
module Testing where

import Circuit
import Clash.Prelude hiding (undefined)
import Clash.Signal.Internal
-- import Data.Default

-- no c =
Expand Down
Loading

0 comments on commit 3732d4c

Please sign in to comment.