I am trying to import .csv data and so I am trying to build a simple example using cassava and I have run out of ideas to get it to work. I added cassava-0.5.1.0 to stack.yaml and then the builder failed based on version and suggested bytestring-0.10.2.0, which I added then version failed and suggested deepseq-1.3.0.2 and then version failed and suggested base-4.7.0.2 and fails and keeps suggesting adding base-4.7.0.2 though it is in there. I tried "allow-newer: true" and gave a bunch of type failures. I also tried stack solver --update-config which just removed all the extra-deps: including cassava. It appears not to find base-4.7.0.2. This is my first attempt to build something useful with stack.
"stack build" output below:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for deepseq-1.3.0.2:
base-4.11.1.0 from stack configuration does not match >=4.3 && <4.8 (latest matching version is 4.7.0.2)
needed due to bayesHask-0.1.0.0 -> deepseq-1.3.0.2
Some different approaches to resolving this:
* Set 'allow-newer: true' to ignore all version constraints and build anyway.
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.
* Recommended action: try adding the following to your extra-deps in /home/jack/Dropbox/src/bayesHask/stack.yaml:
- base-4.7.0.2
Plan construction failed.
stack.yaml file:
flags: {}
packages:
- .
extra-deps:
- cassava-0.5.1.0
- bytestring-0.10.2.0
- deepseq-1.3.0.2
- base-4.7.0.2
resolver: lts-12.5
#allow-newer: true
Lib.hs file:
module Lib
( someFunc
) where
import qualified Data.ByteString.Lazy as BL
import Data.Csv
import qualified Data.Vector as V
someFunc :: IO ()
someFunc = putStrLn "someFunc"
package.yaml file:
name: bayesHask
version: 0.1.0.0
github: "githubuser/bayesHask"
license: BSD3
author: "Jack Vice"
copyright: "2018 Jack Vice"
extra-source-files:
- README.md
- ChangeLog.md
# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web
# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
dependencies:
- base >= 4.7 && < 5
- text
- bytestring
- cassava
library:
source-dirs: src
executables:
bayesHask-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- bayesHask
tests:
bayesHask-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- bayesHask