Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbastiaan committed Nov 5, 2023
1 parent 618e375 commit b1f5301
Show file tree
Hide file tree
Showing 7 changed files with 566 additions and 142 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI
on:
pull_request:
push:
branches: [master]
# branches: [master]

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -18,7 +18,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 +31,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 +51,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
5 changes: 3 additions & 2 deletions example/Testing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
For testing the circuit notation.
-}

{-# LANGUAGE Arrows #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE GADTs #-}
-- {-# LANGUAGE NoMonomorphismRestriction #-}
Expand All @@ -24,9 +23,11 @@ For testing the circuit notation.
{-# 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 b1f5301

Please sign in to comment.