Skip to content

Commit

Permalink
Merge pull request #9 from gdziadkiewicz/Add_9.4.7
Browse files Browse the repository at this point in the history
Add 9.4.7
  • Loading branch information
gdziadkiewicz authored Oct 31, 2023
2 parents 11ef72f + e9cd4dd commit ca5ca0c
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 15 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ jobs:
- 8.8.4
- 8.10.7
- 9.0.1
- 9.4.7
exclude:
- os: macOS-latest
ghc: 8.6.5
- os: windows-latest
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:
Expand All @@ -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 }}
Expand All @@ -64,24 +65,25 @@ jobs:
- 8.8.4
- 8.10.7
- 9.0.1
- 9.4.7
exclude:
- os: macOS-latest
ghc: 8.6.5
- os: windows-latest
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
Expand Down
2 changes: 1 addition & 1 deletion hue.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ library
, http-types
, blaze-builder
, hostname
, aeson < 2
, aeson > 2
, bytestring
, text
, containers
Expand Down
4 changes: 2 additions & 2 deletions src/Hue/Internal/Light.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Hue/Internal/Sensor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
68 changes: 68 additions & 0 deletions stack-9.4.7.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca5ca0c

Please sign in to comment.