Skip to content

Commit

Permalink
Bump dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbastiaan committed Oct 10, 2021
1 parent e361a8b commit 058213d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 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-08-01T23:17:24Z
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
4 changes: 2 additions & 2 deletions clash-ghc/clash-ghc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,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.5.0,
Expand All @@ -159,7 +159,7 @@ 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,
time >= 1.4.0.1 && < 1.13,
ghc-boot >= 8.6.0 && < 9.1,
ghc-prim >= 0.3.1.0 && < 0.8,
ghci >= 8.6.0 && < 9.1,
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 @@ -126,7 +126,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 @@ -167,8 +167,8 @@ Library
temporary >= 1.2.1 && < 1.4,
terminal-size >= 0.3 && < 0.4,
text >= 1.2.2 && < 1.3,
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,
vector >= 0.11 && < 1.0,
vector-binary-instances >= 0.2.3.5 && < 0.3,
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 @@ -229,12 +229,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
9 changes: 9 additions & 0 deletions clash-lib/src/Clash/Primitives/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Type and instance definitions for Primitive
-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NamedFieldPuns #-}
Expand Down Expand Up @@ -51,6 +52,10 @@ import GHC.Generics (Generic)
import GHC.Stack (HasCallStack)
import Text.Read (readMaybe)

#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 +232,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 @@ -344,8 +344,8 @@ Library
th-lift >= 0.7.0 && < 0.9,
th-orphans >= 0.13.1 && < 1.0,
text >= 0.11.3.1 && < 1.3,
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 058213d

Please sign in to comment.