Skip to content

Commit

Permalink
Bump dependency versions (#1949)
Browse files Browse the repository at this point in the history
Related: commercialhaskell/stackage#6217
(cherry picked from commit 7267499)
  • Loading branch information
martijnbastiaan authored and Alex McKenna committed Oct 11, 2021
1 parent 43d704c commit cd8186f
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
7 changes: 6 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ write-ghc-environment-files: always
-- index state, to go along with the cabal.project.freeze file. update the index
-- state by running `cabal update` twice and looking at the index state it
-- displays to you (as the second update will be a no-op)
index-state: 2021-06-21T10:46:43Z
index-state: 2021-10-10T07:42:38Z

-- For some reason the `clash-testsuite` executable fails to run without
-- this, as it cannot find the related library...
Expand Down Expand Up @@ -60,3 +60,8 @@ source-repository-package
location: https://github.com/kcsongor/generic-lens.git
tag: 8e1fc7dcf444332c474fca17110d4bc554db08c8
subdir: generic-lens

source-repository-package
type: git
location: https://github.com/hasufell/aeson-pretty.git
tag: e902ab866bb41d990b66af3644aeb352ff7aaf6f
7 changes: 7 additions & 0 deletions clash-cosim/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import Text.Printf (printf)
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL

#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.KeyMap as KM
#endif

__COSIM_MAX_NUMBER_OF_ARGUMENTS__ = 16
__COSIM_MAX_NUMBER_OF_CLOCKS__ = 1
Expand Down Expand Up @@ -192,7 +195,11 @@ blackboxObject
-- ^ templateD
-> Value
blackboxObject bbname type_ templateD =
#if MIN_VERSION_aeson(2,0,0)
Object (KM.fromList [("BlackBox", Object (KM.fromList [
#else
Object (fromList [("BlackBox", Object (fromList [
#endif
("name", String $ Text.pack bbname)
, ("kind", "Declaration")
, ("type", String $ Text.pack type_)
Expand Down
6 changes: 3 additions & 3 deletions clash-ghc/clash-ghc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ library
mtl >= 2.1.1 && < 2.3,
split >= 0.2.3 && < 0.3,
text >= 1.2.2 && < 1.3,
transformers >= 0.5.2.0 && < 0.6,
transformers >= 0.5.2.0 && < 0.7,
unordered-containers >= 0.2.1.0 && < 0.3,

clash-lib == 1.4.3,
Expand All @@ -170,8 +170,8 @@ library
ghc-typelits-knownnat >= 0.6 && < 0.8,
ghc-typelits-natnormalise >= 0.6 && < 0.8,
deepseq >= 1.3.0.2 && < 1.5,
time >= 1.4.0.1 && < 1.12,
ghc-boot >= 8.4.0 && < 9.1,
time >= 1.4.0.1 && < 1.13,
ghc-boot >= 8.6.0 && < 9.1,
ghc-prim >= 0.3.1.0 && < 0.8,
ghci >= 8.4.0 && < 9.1,
uniplate >= 1.6.12 && < 1.8,
Expand Down
6 changes: 3 additions & 3 deletions clash-lib/clash-lib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Library
RecordWildCards
TemplateHaskell

Build-depends: aeson >= 0.6.2.0 && < 1.6,
Build-depends: aeson >= 0.6.2.0 && < 2.1,
aeson-pretty >= 0.8 && < 0.9,
ansi-terminal >= 0.8.0.0 && < 0.12,
array,
Expand Down Expand Up @@ -181,8 +181,8 @@ Library
terminal-size >= 0.3 && < 0.4,
text >= 1.2.2 && < 1.3,
text-show >= 3.7 && < 3.10,
time >= 1.4.0.1 && < 1.12,
transformers >= 0.5.2.0 && < 0.6,
time >= 1.4.0.1 && < 1.13,
transformers >= 0.5.2.0 && < 0.7,
trifecta >= 1.7.1.1 && < 2.2,
utf8-string >= 1.0.1 && < 1.1,
vector >= 0.11 && < 1.0,
Expand Down
3 changes: 1 addition & 2 deletions clash-lib/src/Clash/Driver/Manifest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@ instance FromJSON Manifest where
<*> parseWithRead "init_behavior" v
<*> parseWithRead "reset_polarity" v

parseWithRead :: Read a => Text -> Aeson.Object -> Parser a
parseWithRead field obj = do
v <- obj .:? field
case readMaybe =<< v of
Just a -> pure a
Nothing -> fail $ "Could not read field: " <> Text.unpack field
Nothing -> fail $ "Could not read field: " <> show field

data UnexpectedModification
-- | Clash generated file was modified
Expand Down
12 changes: 11 additions & 1 deletion clash-lib/src/Clash/Primitives/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
Copyright : (C) 2012-2016, University of Twente,
2016-2017, Myrtle Software Ltd
2018 , Google Inc.
2021 , QBayLogic B.V.
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <christiaan.baaij@gmail.com>
Maintainer : QBayLogic B.V. <devops@qbaylogic.com>
Type and instance definitions for Primitive
-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
Expand Down Expand Up @@ -51,6 +53,10 @@ import Data.Text.Lazy (Text)
import GHC.Generics (Generic)
import GHC.Stack (HasCallStack)

#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.KeyMap as KeyMap
#endif

-- | An unresolved primitive still contains pointers to files.
type UnresolvedPrimitive = Primitive Text ((TemplateFormat,BlackBoxFunctionName),Maybe TemplateSource) (Maybe S.Text) (Maybe TemplateSource)

Expand Down Expand Up @@ -227,7 +233,11 @@ data Primitive a b c d

instance FromJSON UnresolvedPrimitive where
parseJSON (Object v) =
#if MIN_VERSION_aeson(2,0,0)
case KeyMap.toList v of
#else
case H.toList v of
#endif
[(conKey,Object conVal)] ->
case conKey of
"BlackBoxHaskell" -> do
Expand Down
4 changes: 2 additions & 2 deletions clash-prelude/clash-prelude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ Library
th-orphans >= 0.13.1 && < 1.0,
text >= 0.11.3.1 && < 1.3,
text-show >= 3.7 && < 3.10,
time >= 1.8 && < 1.12,
transformers >= 0.5.2.0 && < 0.6,
time >= 1.8 && < 1.13,
transformers >= 0.5.2.0 && < 0.7,
type-errors >= 0.2.0.0 && < 0.3,
uniplate >= 1.6.12 && < 1.7,
vector >= 0.11 && < 1.0
Expand Down

0 comments on commit cd8186f

Please sign in to comment.