The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

449049 (17) [Avatar] Offline
#1
Hey! I enjoyed the Stock Quotes chapter without any problem. Except that when I tried building the completed project I'm Stack is giving me trouble with the following chart imports:
import Graphics.Rendering.Chart.Easy (plot, line, (.=), layout_title)
import Graphics.Rendering.Chart.Backend.Diagrams (toFile,
                                                  loadSansSerifFonts,
                                                  FileOptions (..),
                                                  FileFormat (SVG))



It says it could not find both modules. I had trouble initially building the chart package but found a work around. It didn't help though. The following is my `package.yaml`


dependencies:
- base >= 4.7 && < 5
- time
- text
- fmt
- cassava
- optparse-applicative
- bytestring
- safe
- diagrams
- diagrams-lib
- diagrams-contrib
- diagrams-svg
- diagrams-core
library:
  source-dirs: src

executables:
  stockell-exe:
    main:                Main.hs
    source-dirs:         app
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - stockell


Additionally, I tried copying your `package.yaml` dependencies from the stockquote section https://github.com/bravit/hid-examples/blob/master/package.yaml without any success. Any idea on what could be causing the problem.

This was the solution I initially found: https://github.com/commercialhaskell/stack/issues/3964

Thanks! Learning a ton from the book so far! smilie

Vitaly Bragilevsky (18) [Avatar] Offline
#2
Hi! Which stackage LTS are you using? The only supported version is lts-10.10, as specified here: https://github.com/bravit/hid-examples/blob/master/stack.yaml
449049 (17) [Avatar] Offline
#3
Thanks a lot! This did it. I hadn't specified an LTS.