-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,10 @@ | ||
{-# LANGUAGE Arrows #-} | ||
|
||
-- This option is a test by itself: if we were to export a plugin with the | ||
-- wrong type or name, GHC would refuse to compile this file. | ||
{-# OPTIONS -fplugin=CircuitNotation #-} | ||
|
||
module Main where | ||
|
||
import Circuit | ||
import Clash.Prelude | ||
|
||
main :: IO () | ||
main = pure () | ||
|
||
testIdCircuit :: Circuit (Signal dom Bool) (Signal dom Bool) | ||
testIdCircuit = circuit $ \x -> x | ||
|
||
-- test that signals can be duplicated | ||
testDupCircuit :: Circuit (Signal dom Bool) (Signal dom Bool, Signal dom Bool) | ||
testDupCircuit = circuit $ \x -> (x, x) | ||
|
||
testDup2Circuit :: Circuit (Signal dom Bool) (Signal dom Bool, Signal dom Bool, Signal dom Bool) | ||
testDup2Circuit = circuit $ \x -> do | ||
y <- idC -< x | ||
idC -< (y, y, x) |