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
Add reset-related convenience functions #2539
Conversation
6dc028f
to
1f7e5ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are definitely good to have! Let's get rid of "you need unsafeX
to do this"! I'd like to do it a bit different though. Type safety is great. Amassing type constraints not so much.
1f7e5ae
to
521d176
Compare
@DigitalBrains1 @leonschoorl I've added proposal for the new constraint aliases. I'm reasonably happy with their names and definition (keep in mind the long-term plan is to get rid of |
Maybe |
521d176
to
bb61b55
Compare
I've picked |
I'd like it if the documentation points out how users can manage these constraints efficiently. We discussed how people could create their own type synonyms in a single design with multiple clock domains like type DesignDomain dom =
( HasSynchronousReset dom
, HasDefinedInitialValues dom
) and then write all their domain-polymorphic functions in the design as f ::
DesignDomain dom =>
Signal dom [...] which is just as much code as |
bb61b55
to
e644cf0
Compare
Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
e644cf0
to
73b8322
Compare
Suggested changes have been applied
Even though the relative links all worked in `Clash.Signal.Internal`, `Clash.Signal` and `Clash.Explicit.Signal`, it was broken in `Clash.Prelude`. This amends PR #2539
Still TODO: