clash-compiler
clash-compiler copied to clipboard
Add `maybeResize` (and friends)
We have resize
, a function that can truncate by throwing away bits. We also have checkedResize
, a function that does the same, but throws an error in simulation if the value of the argument does not fit in the result type. Ideally, we'd also have a total function that returns a Maybe
instead.