packages feed

clash-ghc 0.6.5 → 0.6.6

raw patch · 5 files changed

+21/−2 lines, 5 filesdep ~clash-prelude

Dependency ranges changed: clash-prelude

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog for the [`clash-ghc`](http://hackage.haskell.org/package/clash-ghc) package +## 0.6.6 *December 11th 2015*+* New features:+  * Remove all existing HDL files before generating new ones. This can be disabled by the `-clash-noclean` flag. [#96](https://github.com/clash-lang/clash-compiler/issues/96)+  * Support for `clash-prelude` 0.10.4+ ## 0.6.5 *November 17th 2015* * Fixes bugs:   * Integer literals used as arguments not always properly annotated with their type.
clash-ghc.cabal view
@@ -1,5 +1,5 @@ Name:                 clash-ghc-Version:              0.6.5+Version:              0.6.6 Synopsis:             CAES Language for Synchronous Hardware Description:   CλaSH (pronounced ‘clash’) is a functional hardware description language that@@ -98,7 +98,7 @@                       clash-systemverilog       >= 0.6.3,                       clash-vhdl                >= 0.6.4,                       clash-verilog             >= 0.6.3,-                      clash-prelude             >= 0.10.3 && < 0.11,+                      clash-prelude             >= 0.10.4 && < 0.11,                       ghc-typelits-extra        >= 0.1,                       ghc-typelits-natnormalise >= 0.3 
src-bin/Main.hs view
@@ -120,6 +120,7 @@                              , opt_inlineLimit = 20                              , opt_specLimit   = 20                              , opt_inlineBelow = 15+                             , opt_cleanhdl    = True                              })     (argv3, clashFlagWarnings) <- parseCLaSHFlags r argv2 
src-ghc/CLaSH/GHC/CLaSHFlags.hs view
@@ -33,6 +33,7 @@   , defFlag "clash-spec-limit" (IntSuffix (liftEwM . setSpecLimit r))   , defFlag "clash-inline-below" (IntSuffix (liftEwM . setInlineBelow r))   , defFlag "clash-debug" (SepArg (setDebugLevel r))+  , defFlag "clash-noclean" (NoArg (liftEwM (setNoClean r)))   ]  setInlineLimit :: IORef CLaSHOpts@@ -56,3 +57,6 @@ setDebugLevel r s = case readMaybe s of   Just dbgLvl -> liftEwM $ modifyIORef r (\c -> c {opt_dbgLevel = dbgLvl})   Nothing     -> addWarn (s ++ " is an invalid debug level")++setNoClean :: IORef CLaSHOpts -> IO ()+setNoClean r = modifyIORef r (\c -> c {opt_cleanhdl = False})
src-ghc/CLaSH/GHC/Evaluator.hs view
@@ -187,6 +187,15 @@             [intCon] = tyConDataCons intTc         in  mkApps (Data intCon) [Left (Literal (IntegerLiteral (toInteger (n - 1))))]       _ -> e+  | isSubj && nm == "CLaSH.Sized.Vector.length"+  = case Either.rights args of+      [LitTy (NumTy n), _] ->+        let ty' = runFreshM (termType tcm e)+            (TyConApp intTcNm _) = tyView ty'+            (Just intTc) = HashMap.lookup intTcNm tcm+            [intCon] = tyConDataCons intTc+        in  mkApps (Data intCon) [Left (Literal (IntegerLiteral (toInteger n)))]+      _ -> e  reduceConstant _ _ e = e