Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack build error with HueJSON.hs #11

Open
musicjeremy opened this issue Dec 20, 2020 · 0 comments
Open

stack build error with HueJSON.hs #11

musicjeremy opened this issue Dec 20, 2020 · 0 comments

Comments

@musicjeremy
Copy link

relevant error output of stack build
[ 7 of 20] Compiling HueJSON
/home/jeremy/hue-dashboard/HueJSON.hs:441:55: error:
• Couldn't match type ‘[Char]’ with ‘LightID’
arising from a use of ‘coerce’
• In the expression: coerce a
In the first argument of ‘(<$>)’, namely
‘(\ (a :: HM.HashMap String Light) -> coerce a)’
In the expression:
(\ (a :: HM.HashMap String Light) -> coerce a) <$> parseJSON v
|
441 | parseJSON v = ((a :: HM.HashMap String Light) -> coerce a) <$> parseJSON v
| ^^^^^^^^

/home/jeremy/hue-dashboard/HueJSON.hs:444:70: error:
• Couldn't match type ‘[Char]’ with ‘GroupName’
arising from a use of ‘coerce’
• In the expression: coerce a
In the first argument of ‘(<$>)’, namely
‘(\ (a :: HM.HashMap String (HS.HashSet LightID)) -> coerce a)’
In the expression:
(\ (a :: HM.HashMap String (HS.HashSet LightID)) -> coerce a)
<$> parseJSON v
|
444 | parseJSON v = ((a :: HM.HashMap String (HS.HashSet LightID)) -> coerce a) <$> parseJSON v
| ^^^^^^^^

/home/jeremy/hue-dashboard/HueJSON.hs:447:61: error:
• Couldn't match type ‘[Char]’ with ‘BridgeSceneID’
arising from a use of ‘coerce’
• In the expression: coerce a
In the first argument of ‘(<$>)’, namely
‘(\ (a :: HM.HashMap String BridgeScene) -> coerce a)’
In the expression:
(\ (a :: HM.HashMap String BridgeScene) -> coerce a)
<$> parseJSON v
|
447 | parseJSON v = ((a :: HM.HashMap String BridgeScene) -> coerce a) <$> parseJSON v
| ^^^^^^^^

-- While building package hue-dashboard-0.1.0.0 (scroll up to its section to see the error) using:
/home/jeremy/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build exe:hue-dashboard --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1

My hue-dashboard.cabal file:
name: hue-dashboard
version: 0.1.0.0
synopsis: Web dashboard for Philips Hue light bulbs
description: Please see README.md
homepage: https://github.com/blitzcode/hue-dashboard#readme
license: MIT
author: Tim C. Schroeder
maintainer: www.blitzcode.net
copyright: (C) 2016 Tim C. Schroeder
category: Web
build-type: Simple
cabal-version: >=1.10

executable hue-dashboard
main-is: Main.hs
default-language: Haskell2010
build-depends: base >= 4.7 && < 5,
mtl,
transformers,
lens,
ansi-terminal,
unordered-containers,
bytestring,
text,
http-conduit,
http-client,
aeson,
attoparsec,
time,
yaml,
exceptions,
filepath,
hostname,
threepenny-gui,
stm,
async,
JuicyPixels,
vector,
blaze-html,
random,
process,
hashable

other-modules: App,
AppDefs,
BackgroundProcessing,
CmdLineOptions,
HueBroker,
HueJSON,
HueREST,
HueSetup,
LightColor,
PersistConfig,
ProcFS,
Trace,
Util,
WebUI,
WebUIHelpers,
WebUIREST,
WebUITileBuilding,
WebUITileBuildingScenes,
WebUITileBuildingSchedules

-- TODO: Seems like dynamic linking doesn't work on Windows, disable for that platform?
ghc-options: -Wall -rtsopts -with-rtsopts=-N -O2 -j -threaded -dynamic
ghc-prof-options: -fprof-auto -caf-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant