Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename RgbCounter module to Rgb #12

Merged
merged 1 commit into from
Jun 13, 2024
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
4 changes: 2 additions & 2 deletions bayeux.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library
, Bayeux.Cli
, Bayeux.Flow
, Bayeux.Lp
, Bayeux.RgbCounter
, Bayeux.Rgb
, Bayeux.Rtlil
, Bayeux.Tableaux
other-modules: Paths_bayeux
Expand Down Expand Up @@ -51,7 +51,7 @@ test-suite test
hs-source-dirs: test
main-is: Main.hs
other-modules: Test.Bayeux.Lp
, Test.Bayeux.RgbCounter
, Test.Bayeux.Rgb
, Test.Bayeux.Rtlil
build-depends: base
, bayeux
Expand Down
2 changes: 1 addition & 1 deletion lib/Bayeux.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Bayeux (app) where
import Bayeux.Cli
import Bayeux.Flow
import Bayeux.Lp
import Bayeux.RgbCounter
import Bayeux.Rgb
import Bayeux.Rtlil
import Bayeux.Tableaux
import Control.Monad
Expand Down
10 changes: 5 additions & 5 deletions lib/Bayeux/RgbCounter.hs → lib/Bayeux/Rgb.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}

module Bayeux.RgbCounter
module Bayeux.Rgb
( prog
, cycleProg
) where
Expand All @@ -28,10 +28,10 @@ class MonadProcess m where
eq :: SigSpec -> SigSpec -> m SigSpec

-- | If S == 1 then B else A
mux :: SigSpec -- ^ S
-> SigSpec -- ^ A
-> SigSpec -- ^ B
-> m SigSpec -- ^ Y
mux :: SigSpec -- ^ S
-> SigSpec -- ^ A
-> SigSpec -- ^ B
-> m SigSpec -- ^ Y

cycleProg :: MonadProcess m => MonadRgb m => m ()
cycleProg = do
Expand Down
8 changes: 4 additions & 4 deletions test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module Main (main) where

import qualified Test.Bayeux.Lp
import qualified Test.Bayeux.RgbCounter
import qualified Test.Bayeux.Rgb
import qualified Test.Bayeux.Rtlil
import Test.Tasty

main :: IO ()
main = defaultMain $ testGroup "Test.Bayeux"
[ testGroup "Lp" Test.Bayeux.Lp.tests
, testGroup "RgbCounter" Test.Bayeux.RgbCounter.tests
, testGroup "Rtlil" Test.Bayeux.Rtlil.tests
[ testGroup "Lp" Test.Bayeux.Lp.tests
, testGroup "Rgb" Test.Bayeux.Rgb.tests
, testGroup "Rtlil" Test.Bayeux.Rtlil.tests
]
6 changes: 3 additions & 3 deletions test/Test/Bayeux/RgbCounter.hs → test/Test/Bayeux/Rgb.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Test.Bayeux.RgbCounter
module Test.Bayeux.Rgb
( tests
) where

import Bayeux.RgbCounter
import Bayeux.Rgb
import Bayeux.Rtlil
import Data.String
import Data.Text (Text)
Expand Down Expand Up @@ -41,7 +41,7 @@ synthTest n rtl = testCase n $ withTempFile $ \t -> do
(ExitSuccess @=?) =<< waitForProcess =<< spawnCommand c

curDir :: FilePath
curDir = "test" </> "Test" </> "Bayeux" </> "RgbCounter" </> "golden"
curDir = "test" </> "Test" </> "Bayeux" </> "Rgb" </> "golden"

render :: Doc ann -> Text
render = renderStrict . layoutSmart defaultLayoutOptions