packages feed

clash-shake 0.2.1 → 0.2.2

raw patch · 2 files changed

+15/−8 lines, 2 filesdep ~clash-ghcdep ~clash-libdep ~clash-preludePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: clash-ghc, clash-lib, clash-prelude

API changes (from Hackage documentation)

Files

clash-shake.cabal view
@@ -5,12 +5,12 @@ -- see: https://github.com/sol/hpack  name:           clash-shake-version:        0.2.1+version:        0.2.2 synopsis:       Shake rules for building Clash programs description:    Shake rules for building Clash programs and synthesizing FPGA-                configuration. Contains build rules for Xilinx ISE and Xilinx Vivado-                toolchains. See <https://github.com/gergoerdi/clash-pong/> for an-                example project.+                configuration. Contains build rules for Xilinx ISE, Xilinx Vivado,+                Intel Quartus and the open-source SymbiFlow toolchains.  See+                <https://github.com/gergoerdi/clash-pong/> for an example project. category:       Hardware, Shake homepage:       https://github.com/gergoerdi/clash-shake#readme bug-reports:    https://github.com/gergoerdi/clash-shake/issues@@ -45,9 +45,9 @@       aeson     , base >=4.14 && <5     , bytestring-    , clash-ghc >=1.4.2 && <1.5-    , clash-lib >=1.4.2 && <1.5-    , clash-prelude >=1.4.2 && <1.5+    , clash-ghc >=1.4.2 && <1.5 || >=1.6.1 && <1.7+    , clash-lib >=1.4.2 && <1.5 || >=1.6.1 && <1.7+    , clash-prelude >=1.4.2 && <1.5 || >=1.6.1 && <1.7     , directory     , shake     , split
src/Clash/Shake.hs view
@@ -34,6 +34,7 @@ import qualified System.Directory as Dir import Control.Exception (bracket) import Data.Maybe (fromJust)+import Data.Bits  import Clash.Driver.Manifest import Clash.Prelude (pack)@@ -152,10 +153,16 @@     writeFileChanged out (unlines lines)  binLines :: Maybe Int -> BS.ByteString -> [String]-binLines size bs = map (filter (/= '_') . show . pack) bytes+binLines size bs = map bitsOf bytes   where     bytes = maybe id ensureSize size $ BS.unpack bs     ensureSize size bs = take size $ bs <> repeat 0x00++bitsOf :: (FiniteBits a) => a -> [Char]+bitsOf x = reverse $ go (finiteBitSize x) x+  where+    go 0 _ = []+    go n x = (if testBit x 0 then '1' else '0') : go (n-1) (x `shiftR` 1)  isModuleName :: String -> Bool isModuleName = all (isUpper . head) . splitOn "."