v1.4.0
版本发布时间: 2021-03-12 18:25:22
clash-lang/clash-compiler最新发布版本:v1.8.1(2023-11-11 06:13:10)
Although this release includes many small bug fixes and a few API changes, it mostly consists of internal changes to Clash. As promised when releasing v1.2.2 we've put a lot of effort in laying the groundwork for a partial evaluator. We believe this would make Clash an order of magnitude faster as well as more reliable when released. We've also refactored the way Clash generates unique identifiers which works around a number of issues with EDA tools our users have observed. Sadly, we haven't been able to make progress with Shake rules for Clash, promised in the same blog post.
Apart from changes to Clash itself, we've continued to build the ecosystem itself:
- Clash starters is now hosted in its own repository. It now has built-in support for Stack, allowing users to start a new project with a single command.
- Clash protocols is an experimental project making it easier to write Clash circuits with bidirectional communication.
As said, most changes in this release have been internal to Clash - setting the stage for a faster and even more reliable Clash. Still, we expect a number of issues to impact users upgrading to 1.4:
- Clash no longer disables the monomorphism restriction. See #1270, and mentioned issues, as to why. This can cause, among other things, certain eta-reduced descriptions of sequential circuits to no longer type-check. See #1349 for code hints on what kind of changes to make to your own code in case it no longer type-checks due to this change.
- Type arguments of
Clash.Sized.Vector.fold
swapped: beforeforall a n . (a -> a -> a) -> Vec (n+1) a -> a
, afterforall n a . (a -> a -> a) -> Vec (n+1) a
. This makes it easier to usefold
in a1 <= n
context so you can "simply" dofold @(n-1)
-
Fixed
now obeys the laws forEnum
as set out in the Haskell Report, and it is now consistent with the documentation for theEnum
class on Hackage. AsFixed
is alsoBounded
, the rule in the Report thatsucc maxBound
andpred minBound
should result in a runtime error is interpreted as meaning thatsucc
andpred
result in a runtime error whenever the result cannot be represented, not merely forminBound
andmaxBound
alone. - To ease integration with external tools, Clash will now create a separate directory for each top entity under their fully qualified name. For example, a single module
A
containing two top entitiesfoo
andbar
will produce an HDL folder with two folders in it:A.foo
andA.bar
. Fully qualified names are not influenced by top entity annotations; instead, the Haskell name of the function is used. Files within their respective directories will be affected by names set in annotations.
Thanks to all our contributors, issue reporters, and mailing list users - you make this possible.
View all the changes in the CHANGELOG.