packages feed

clash-lib 0.6.4 → 0.6.5

raw patch · 4 files changed

+11/−3 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- CLaSH.Rewrite.Types: bindings :: Lens' (RewriteState extra_aWYS) (HashMap TmName (Type, Term))
+ CLaSH.Rewrite.Types: bindings :: Lens' (RewriteState extra_a3Acs) (HashMap TmName (Type, Term))
- CLaSH.Rewrite.Types: curFun :: Lens' (RewriteState extra_aWYS) TmName
+ CLaSH.Rewrite.Types: curFun :: Lens' (RewriteState extra_a3Acs) TmName
- CLaSH.Rewrite.Types: extra :: Lens (RewriteState extra_aWYS) (RewriteState extra_aX24) extra_aWYS extra_aX24
+ CLaSH.Rewrite.Types: extra :: Lens (RewriteState extra_a3Acs) (RewriteState extra_a3AfP) extra_a3Acs extra_a3AfP
- CLaSH.Rewrite.Types: nameCounter :: Lens' (RewriteState extra_aWYS) Int
+ CLaSH.Rewrite.Types: nameCounter :: Lens' (RewriteState extra_a3Acs) Int
- CLaSH.Rewrite.Types: transformCounter :: Lens' (RewriteState extra_aWYS) Int
+ CLaSH.Rewrite.Types: transformCounter :: Lens' (RewriteState extra_a3Acs) Int
- CLaSH.Rewrite.Types: uniqSupply :: Lens' (RewriteState extra_aWYS) Supply
+ CLaSH.Rewrite.Types: uniqSupply :: Lens' (RewriteState extra_a3Acs) Supply

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for the [`clash-lib`](http://hackage.haskell.org/package/clash-lib) package +## 0.6.5 *November 17th 2015*+* Fixes bugs:+  * Integer literals used as arguments not always properly annotated with their type.+ ## 0.6.4 *November 12th 2015* * Fixes bugs:   * Reversing alternatives is not meaning preserving for literal patterns [#91](https://github.com/clash-lang/clash-compiler/issues/91)
clash-lib.cabal view
@@ -1,5 +1,5 @@ Name:                 clash-lib-Version:              0.6.4+Version:              0.6.5 Synopsis:             CAES Language for Synchronous Hardware - As a Library Description:   CλaSH (pronounced ‘clash’) is a functional hardware description language that
src/CLaSH/Netlist/BlackBox.hs view
@@ -97,7 +97,7 @@       Just hwTy -> case collectArgs e of         (Var _ v,[]) -> let vT = Identifier (mkBasicId . pack $ name2String v) Nothing                         in  return ((vT,hwTy,False),[])-        (C.Literal (IntegerLiteral i),[]) -> return ((N.Literal Nothing (N.NumLit i),hwTy,True),[])+        (C.Literal (IntegerLiteral i),[]) -> return ((N.Literal (Just (Integer,32)) (N.NumLit i),hwTy,True),[])         (C.Literal (StringLiteral s),[]) -> return ((N.Literal Nothing (N.StringLit s),hwTy,True),[])         (Prim f _,args) -> do           (e',d) <- mkPrimitive True False f args ty
src/CLaSH/Netlist/BlackBox/Util.hs view
@@ -253,7 +253,11 @@                               in  (displayT . renderOneLine) <$> expr False e renderTag b (L n)           = let (s,_,_) = bbInputs b !! n                                   e       = either id fst s-                              in  (displayT . renderOneLine) <$> expr False e+                              in  (displayT . renderOneLine) <$> expr False (mkLit e)+  where+    mkLit (Literal (Just (Integer,_)) i) = Literal Nothing i+    mkLit i                              = i+ renderTag _ (Sym n)         = return $ Text.pack ("n_" ++ show n) renderTag b (Typ Nothing)   = fmap (displayT . renderOneLine) . hdlType . snd $ bbResult b renderTag b (Typ (Just n))  = let (_,ty,_) = bbInputs b !! n