packages feed

clash-ghc 0.6.18 → 0.6.19

raw patch · 3 files changed

+18/−9 lines, 3 filesdep ~clash-libdep ~clash-preludedep ~clash-vhdl

Dependency ranges changed: clash-lib, clash-prelude, clash-vhdl, process, time, transformers

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog for the [`clash-ghc`](http://hackage.haskell.org/package/clash-ghc) package +## 0.6.19 *June 9th 2016*+* Fixes bugs:+  * `Eq` instance of `Vec` sometimes not synthesisable+  * VHDL: Converting product types to std_logic_vector fails when the `clash-hdlsyn Vivado` flag is enabled+ ## 0.6.18 *June 7th 2016* * New features:   * DEC transformation also lifts HO-primitives applied to "interesting" primitives (i.e. `zipWith (*)`)
clash-ghc.cabal view
@@ -1,5 +1,5 @@ Name:                 clash-ghc-Version:              0.6.18+Version:              0.6.19 Synopsis:             CAES Language for Synchronous Hardware Description:   CλaSH (pronounced ‘clash’) is a functional hardware description language that@@ -94,11 +94,11 @@                       unbound-generics          >= 0.1      && < 0.4,                       unordered-containers      >= 0.2.1.0  && < 0.3, -                      clash-lib                 >= 0.6.16   && < 0.7,+                      clash-lib                 >= 0.6.17   && < 0.7,                       clash-systemverilog       >= 0.6.6    && < 0.7,-                      clash-vhdl                >= 0.6.12   && < 0.7,+                      clash-vhdl                >= 0.6.13   && < 0.7,                       clash-verilog             >= 0.6.6    && < 0.7,-                      clash-prelude             >= 0.10.8   && < 0.11,+                      clash-prelude             >= 0.10.9   && < 0.11,                       ghc-typelits-extra        >= 0.1      && < 0.2,                       ghc-typelits-natnormalise >= 0.3      && < 0.5,                       deepseq                   >= 1.3.0.2  && < 1.5,
src-ghc/CLaSH/GHC/Evaluator.hs view
@@ -9,6 +9,7 @@  module CLaSH.GHC.Evaluator where +import           Control.Monad.Trans.Except (runExcept) import qualified Data.Bifunctor      as Bifunctor import           Data.Bits           (shiftL,shiftR) import qualified Data.Either         as Either@@ -21,12 +22,12 @@ import           CLaSH.Core.DataCon  (DataCon (..)) import           CLaSH.Core.Literal  (Literal (..)) import           CLaSH.Core.Term     (Term (..))-import           CLaSH.Core.Type     (Type (..), ConstTy (..), LitTy (..),+import           CLaSH.Core.Type     (Type (..), ConstTy (..),                                       TypeView (..), tyView, mkFunTy,                                       mkTyConApp, splitFunForallTy) import           CLaSH.Core.TyCon    (TyCon, TyConName, tyConDataCons) import           CLaSH.Core.TysPrim  (typeNatKind)-import           CLaSH.Core.Util     (collectArgs,mkApps,mkVec,termType)+import           CLaSH.Core.Util     (collectArgs,mkApps,mkVec,termType,tyNatSize) import           CLaSH.Core.Var      (Var (..))  reduceConstant :: HashMap.HashMap TyConName TyCon -> Bool -> Term -> Term@@ -244,14 +245,16 @@    "CLaSH.Sized.Vector.replicate"     | isSubj-    , (TyConApp vecTcNm [LitTy (NumTy len),argTy]) <- tyView (runFreshM (termType tcm e))+    , (TyConApp vecTcNm [lenTy,argTy]) <- tyView (runFreshM (termType tcm e))+    , Right len <- runExcept (tyNatSize tcm lenTy)     -> let (Just vecTc) = HashMap.lookup vecTcNm tcm            [nilCon,consCon] = tyConDataCons vecTc        in  mkVec nilCon consCon argTy len (replicate len (last $ Either.lefts args))    "CLaSH.Sized.Vector.maxIndex"     | isSubj-    , [LitTy (NumTy n), _] <- Either.rights args+    , [nTy, _] <- Either.rights args+    , Right n <- runExcept (tyNatSize tcm nTy)     -> let ty' = runFreshM (termType tcm e)            (TyConApp intTcNm _) = tyView ty'            (Just intTc) = HashMap.lookup intTcNm tcm@@ -260,7 +263,8 @@    "CLaSH.Sized.Vector.length"     | isSubj-    , [LitTy (NumTy n), _] <- Either.rights args+    , [nTy, _] <- Either.rights args+    , Right n <-runExcept (tyNatSize tcm nTy)     -> let ty' = runFreshM (termType tcm e)            (TyConApp intTcNm _) = tyView ty'            (Just intTc) = HashMap.lookup intTcNm tcm