Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@ jobs:
os: [ubuntu-latest]
cabal: ["latest"]
ghc:
- "8.6.5"
- "8.10.7"
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.4"
- "9.8.2"
- "9.10.1"
- "9.6.7"
- "9.8.4"
- "9.10.3"
- "9.12.4"

steps:
- uses: actions/checkout@v3
Expand Down
18 changes: 9 additions & 9 deletions circuit-notation.cabal
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
-- cabal-version: 2.2
cabal-version: 2.4
name: circuit-notation
version: 0.1.0.0
synopsis: A source plugin for manipulating circuits in clash with a arrow notation
-- description:
license: BSD3
license: BSD-3-Clause
license-file: LICENSE
author: Christopher Chalmers
maintainer: c.chalmers@me.com
copyright: 2024 Christopher Chalmers
category: Hardware
build-type: Simple
cabal-version: >=1.10
tested-with:
GHC ==9.6.7
, GHC ==9.8.4
, GHC ==9.10.3
, GHC ==9.12.4

library
exposed-modules: CircuitNotation Circuit

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

if impl(ghc < 9.10)
if impl(ghc < 9.8)
other-modules:
GHC.Types.Unique.Map.Extra

Expand All @@ -29,7 +29,7 @@ library
, clash-prelude >= 1.0
, containers
, data-default
, ghc (>=8.6 && <8.8) || (>=8.10 && < 9.12)
, ghc >= 9.6 && < 9.13
, lens
, mtl
, parsec
Expand Down
10 changes: 0 additions & 10 deletions example/Example.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ This file contains examples of using the Circuit Notation.
-}

{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

#if __GLASGOW_HASKELL__ < 810
{-# LANGUAGE Arrows #-}
#endif

{-# OPTIONS -fplugin=CircuitNotation #-}
{-# OPTIONS -fplugin-opt=CircuitNotation:debug #-}
{-# OPTIONS -Wall #-}
Expand All @@ -42,11 +37,6 @@ import Clash.Prelude
idCircuit :: Circuit a a
idCircuit = idC

#if __GLASGOW_HASKELL__ < 810
swapC0 :: Circuit (a,b) (b,a)
swapC0 = id $ circuit $ \ ~(a,b) -> ~(b,a)
#endif

swapC1 :: Circuit (a,b) (b,a)
swapC1 = id $ circuit $ \ ~(a,b) -> (b,a)

Expand Down
4 changes: 0 additions & 4 deletions example/Testing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
For testing the circuit notation.
-}

{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ < 810
{-# LANGUAGE Arrows #-}
#endif
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds#-}
{-# LANGUAGE GADTs #-}
Expand Down
60 changes: 30 additions & 30 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/Circuit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
This file contains the 'Circuit' type, that the notation describes.
-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTs #-}
Expand All @@ -28,15 +27,13 @@ module Circuit where

import Clash.Prelude

#if __GLASGOW_HASKELL__ > 900
-- | Unsafe version of ':>'. Will fail if applied to empty vectors. This is used to
-- workaround spurious incomplete pattern match warnings generated in newer GHC
-- versions.
pattern (:>!) :: a -> Vec n a -> Vec (n + 1) a
pattern (:>!) x xs <- (\ys -> (head ys, tail ys) -> (x,xs))
{-# COMPLETE (:>!) #-}
infixr 5 :>!
#endif

type family Fwd a
type family Bwd a
Expand Down
Loading
Loading