clash-lib 1.4.5 → 1.4.6
raw patch · 4 files changed
+31/−9 lines, 4 filesdep ~clash-preludePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: clash-prelude
API changes (from Hackage documentation)
- Clash.Rewrite.Types: bindings :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) BindingMap
+ Clash.Rewrite.Types: bindings :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) BindingMap
- Clash.Rewrite.Types: curFun :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) (Id, SrcSpan)
+ Clash.Rewrite.Types: curFun :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) (Id, SrcSpan)
- Clash.Rewrite.Types: extra :: forall extra_a3uzW extra_a3uIm. Lens (RewriteState extra_a3uzW) (RewriteState extra_a3uIm) extra_a3uzW extra_a3uIm
+ Clash.Rewrite.Types: extra :: forall extra_a3uKr extra_a3uSR. Lens (RewriteState extra_a3uKr) (RewriteState extra_a3uSR) extra_a3uKr extra_a3uSR
- Clash.Rewrite.Types: globalHeap :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) PrimHeap
+ Clash.Rewrite.Types: globalHeap :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) PrimHeap
- Clash.Rewrite.Types: nameCounter :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) Int
+ Clash.Rewrite.Types: nameCounter :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) Int
- Clash.Rewrite.Types: transformCounter :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) Int
+ Clash.Rewrite.Types: transformCounter :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) Int
- Clash.Rewrite.Types: uniqSupply :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) Supply
+ Clash.Rewrite.Types: uniqSupply :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) Supply
- Clash.Rewrite.Types: workFreeBinders :: forall extra_a3uzW. Lens' (RewriteState extra_a3uzW) (VarEnv Bool)
+ Clash.Rewrite.Types: workFreeBinders :: forall extra_a3uKr. Lens' (RewriteState extra_a3uKr) (VarEnv Bool)
Files
- CHANGELOG.md +7/−0
- clash-lib.cabal +2/−2
- src/Clash/Netlist/BlackBox/Util.hs +18/−4
- src/Clash/Normalize/Transformations.hs +4/−3
CHANGELOG.md view
@@ -1,5 +1,12 @@ # Changelog for the Clash project +## 1.4.6 *Oct 26th 2021*++Fixed:++ * Clash tries to cast-specialize non-"global binders" resulting in "specialisation of non-work-free cast" warning [#1933](https://github.com/clash-lang/clash-compiler/issues/1945)+ * More consistently render bare untyped and unsized literals for `~LIT` tags. This fixes [#1934](https://github.com/clash-lang/clash-compiler/issues/1934)+ ## 1.4.5 *Oct 13th 2021* Changed:
clash-lib.cabal view
@@ -1,6 +1,6 @@ Cabal-version: 2.2 Name: clash-lib-Version: 1.4.5+Version: 1.4.6 Synopsis: Clash: a functional hardware description language - As a library Description: Clash is a functional hardware description language that borrows both its@@ -144,7 +144,7 @@ base16-bytestring >= 0.1.1 && < 1.1, binary >= 0.8.5 && < 0.11, bytestring >= 0.10.0.2 && < 0.12,- clash-prelude == 1.4.5,+ clash-prelude == 1.4.6, concurrent-supply >= 0.1.7 && < 0.2, containers >= 0.5.0.0 && < 0.7, cryptohash-sha256 >= 0.11 && < 0.12,
src/Clash/Netlist/BlackBox/Util.hs view
@@ -606,10 +606,24 @@ where (e,_,_) = bbInputs b !! n - mkLit (Literal (Just (Signed _,_)) i) = Literal Nothing i- mkLit (Literal (Just (Unsigned _,_)) i) = Literal Nothing i- mkLit (DataCon _ (DC (Void {}, _)) [Literal (Just (Signed _,_)) i]) = Literal Nothing i- mkLit (DataCon _ (DC (Void {}, _)) [Literal (Just (Unsigned _,_)) i]) = Literal Nothing i+ mkLit (Literal (Just (Signed _,_)) i) = Literal Nothing i -- Integer, Int#+ mkLit (Literal (Just (Unsigned _,_)) i) = Literal Nothing i -- KnownNat, Natural, Word#++ -- TODO Remove the blackboxes for GHC.Types.I# and GHC.Types.W#.+ -- Then we can use these two rules for Int and Word+ -- mkLit (DataCon _ (DC (Void {}, _)) [Literal (Just (Signed _,_)) i]) = Literal Nothing i+ mkLit (DataCon _ (DC (Void {}, _)) [Literal (Just (Unsigned _,_)) i]) = Literal Nothing i -- SNat++ mkLit (BlackBoxE pNm _ _ _ _ bbCtx _) | pNm `elem` ["GHC.Types.I#","GHC.Int.I8#", "GHC.Int.I16#", "GHC.Int.I32#", "GHC.Int.I64#"+ ,"GHC.Types.W#","GHC.Word.W8#","GHC.Word.W16#","GHC.Word.W32#","GHC.Word.W64#"+ ]+ , [Literal _ i] <- extractLiterals bbCtx+ = Literal Nothing i+ mkLit (BlackBoxE pNm _ _ _ _ bbCtx _) | pNm `elem` ["Clash.Sized.Internal.Signed.fromInteger#"+ ,"Clash.Sized.Internal.Unsigned.fromInteger#"+ ,"Clash.Sized.Internal.Index.fromInteger#"]+ , [Literal {}, Literal _ i] <- extractLiterals bbCtx+ = Literal Nothing i mkLit i = i renderTag b e@(Name _i) =
src/Clash/Normalize/Transformations.hs view
@@ -1056,9 +1056,10 @@ -- will be eliminated by 'eliminateCastCast' during the normalization of the -- "current" function. We thus prevent the unnecessary introduction of a -- specialized version of 'f'.- | not (isCast e)- -- Don't specialise prims, because we can't push casts into them- , not . isPrim . fst . collectArgs $ f = do+ | not (isCast e')+ -- We can only push casts into global binders+ , (Var g, _) <- collectArgs f+ , isGlobalId g = do bndrs <- Lens.use bindings isWorkFree workFreeBinders bndrs e' >>= \case True -> go