-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly de-parse escaped brackets in blackboxes
The way that blackboxes of function arguments to higher order blackboxes are handled is somewhat weird. For some reason, I don't fully understand, they're parsed, then de-parsed back into text, and later re-parsed again. This de-parsing didn't correctly re-escape previously escaped square brackets, causing the problem seen in #2809. Fixes #2809
- Loading branch information
1 parent
5927123
commit 63b3853
Showing
5 changed files
with
36 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- see issue #2809 | ||
module MapHead where | ||
|
||
import Clash.Prelude | ||
import Clash.Explicit.Testbench | ||
|
||
|
||
topEntity :: Vec 2 (Vec 2 Int) -> Vec 2 Int | ||
topEntity = map head | ||
{-# CLASH_OPAQUE topEntity #-} | ||
|
||
testBench :: Signal System Bool | ||
testBench = done | ||
where | ||
testInput = stimuliGenerator clk aclr (((0 :> 1 :> Nil) :> (3 :> 4 :> Nil) :> Nil) :> Nil) | ||
expectedOutput = outputVerifier' clk aclr ((0 :> 3 :> Nil) :> Nil) | ||
done = expectedOutput (topEntity <$> testInput) | ||
clk = tbSystemClockGen (not <$> done) | ||
aclr = systemResetGen |