diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0bb8236..4786373 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,7 @@ jobs: - 8.8.4 - 8.10.7 - 9.0.1 + - 9.4.7 exclude: - os: macOS-latest ghc: 8.6.5 @@ -25,10 +26,10 @@ jobs: ghc: 8.6.5 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: haskell/actions/setup@v1 + - uses: haskell-actions/setup@v2 id: setup-haskell-cabal name: Setup Haskell with: @@ -38,7 +39,7 @@ jobs: run: | cabal freeze - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache ~/.cabal/store with: path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} @@ -64,6 +65,7 @@ jobs: - 8.8.4 - 8.10.7 - 9.0.1 + - 9.4.7 exclude: - os: macOS-latest ghc: 8.6.5 @@ -71,17 +73,17 @@ jobs: ghc: 8.6.5 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: haskell/actions/setup@v1 + - uses: haskell-actions/setup@v2 name: Setup Haskell Stack with: ghc-version: ${{ matrix.ghc }} stack-no-global: true enable-stack: true - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache ~/.stack with: path: ~/.stack diff --git a/hue.cabal b/hue.cabal index 4d73c80..c7983a8 100644 --- a/hue.cabal +++ b/hue.cabal @@ -43,7 +43,7 @@ library , http-types , blaze-builder , hostname - , aeson < 2 + , aeson > 2 , bytestring , text , containers diff --git a/src/Hue/Internal/Light.hs b/src/Hue/Internal/Light.hs index 8b20caf..f36fef5 100644 --- a/src/Hue/Internal/Light.hs +++ b/src/Hue/Internal/Light.hs @@ -15,6 +15,7 @@ module Hue.Internal.Light where import Prelude hiding (fail) import Data.Aeson +import qualified Data.Aeson.KeyMap as KeyMap import Data.Time (LocalTime) import Data.Text (Text) import qualified Data.Text as Text @@ -24,7 +25,6 @@ import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Map as Map -import qualified Data.HashMap.Lazy as HashMap import Data.Word import Data.Function import Data.Foldable @@ -451,7 +451,7 @@ instance FromJSON ColorMode where instance FromJSON ScanResult where parseJSON = withObject "Scan result object" $ \v -> do lastScanTime <- v .: "lastscan" - lightMap <- parseJSON $ Object $ HashMap.delete "lastscan" v + lightMap <- parseJSON $ Object $ KeyMap.delete "lastscan" v new <- Map.toList <$> traverse parseName lightMap pure $ ScanResult new lastScanTime where diff --git a/src/Hue/Internal/Sensor.hs b/src/Hue/Internal/Sensor.hs index 622aeba..c4e12ed 100644 --- a/src/Hue/Internal/Sensor.hs +++ b/src/Hue/Internal/Sensor.hs @@ -15,6 +15,7 @@ module Hue.Internal.Sensor where import Prelude hiding (fail) import Data.Aeson +import qualified Data.Aeson.KeyMap as KeyMap import Data.Time (LocalTime) import Data.Text (Text) import qualified Data.Text as Text @@ -182,7 +183,7 @@ instance ToJSON SensorName where instance FromJSON ScanResult where parseJSON = withObject "Scan result object" $ \v -> do lastScanTime <- v .: "lastscan" - sensorMap <- parseJSON $ Object $ HashMap.delete "lastscan" v + sensorMap <- parseJSON $ Object $ KeyMap.delete "lastscan" v new <- Map.toList <$> traverse parseName sensorMap pure $ ScanResult new lastScanTime where diff --git a/stack-9.4.7.yaml b/stack-9.4.7.yaml new file mode 100644 index 0000000..02775a3 --- /dev/null +++ b/stack-9.4.7.yaml @@ -0,0 +1,68 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# http://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# resolver: ghcjs-0.1.0_ghc-7.10.2 +# resolver: +# name: custom-snapshot +# location: "./custom-snapshot.yaml" +resolver: lts-21.19 +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# extra-dep: true +# subdirs: +# - auto-update +# - wai +# +# A package marked 'extra-dep: true' will only be built if demanded by a +# non-dependency (i.e. a user package), and its test suites and benchmarks +# will not be run. This is useful for tweaking upstream packages. +packages: +- '.' +# Dependency packages to be pulled from upstream that are not in the resolver +# (e.g., acme-missiles-0.3) +extra-deps: [] + +# Override default flag values for local packages and extra-deps +flags: + mintty: + Win32-2-13-1: false + +# Extra package databases containing global packages +extra-package-dbs: [] + + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.4" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor \ No newline at end of file diff --git a/stack.yaml b/stack.yaml index 41d664c..02775a3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-18.18 +resolver: lts-21.19 # User packages to be built. # Various formats can be used as shown in the example below. # diff --git a/stack.yaml.lock b/stack.yaml.lock index a9834e3..87d76bb 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: [] snapshots: - completed: - size: 586296 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/18.yaml - sha256: 63539429076b7ebbab6daa7656cfb079393bf644971156dc349d7c0453694ac2 - original: lts-18.18 + sha256: fb482b8e2d5d061cdda4ba1da2957c012740c893a5ee1c1b99001adae7b1fbe7 + size: 640046 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/19.yaml + original: lts-21.19