-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make applyDebug's free variable check take the context into account
Fixes #2623
- Loading branch information
1 parent
930641c
commit 56eda6b
Showing
3 changed files
with
43 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module T2623CaseConFVs where | ||
import Clash.Prelude | ||
|
||
topEntity = foo @System | ||
|
||
foo :: forall dom. Signal dom (Vec 1 (Signed 2)) -> Signal dom Bool | ||
foo = \input -> | ||
let | ||
scs :: Signal dom (Vec 1 Bool) | ||
scs = bundle $ map f $ unbundle input | ||
in | ||
fmap bar scs | ||
|
||
|
||
bar :: (KnownNat n) => Vec (n+1) Bool -> Bool | ||
bar = fold (&&) . map (id) | ||
|
||
f :: Signal dom a -> Signal dom Bool | ||
f = const $ pure $ True |