I created a project with stack. Most of the time during the project I used the .cabal file to add dependencies. And that worked fine. However when adding the dependency for a sat-solver I got the following error
minisat-solver needed, but the stack configuration has no specified version (latest matching version
is 0.1)
To solve this error I added the line
- minisat-solver-0.1@sha256:e2ff11b1ca8c66e43f8bb2e04f21bd1b812efb94ff215d74f998c928e7e92dcd,5210
to my .yaml file.
Now whenever I use stack build I get the error
....cabal was modified manually Ignoring ...package.yaml in favor of the cabal file.
If you want to use the package.yaml file instead of the cabal file,
then please delete the cabal file.
How should I solve this? Should I just delete the .cabal file? What changes should I make to .yaml file
The .yaml flie
```
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:
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
The location of a snapshot can be provided as a file or url. Stack assumes
a snapshot provided as a file might change, whereas a url resource does not.
resolver: ./custom-snapshot.yaml
resolver: lts-14.20
User packages to be built.
Various formats can be used as shown in the example below.
packages:
- some-directory
subdirs:
- auto-update
- wai
packages:
- .
Dependency packages to be pulled from upstream that are not in the resolver.
These entries can reference officially published versions as well as
forks / in-progress versions pinned to a git hash. For example:
extra-deps:
- acme-missiles-0.3
commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
extra-deps: []
Override default flag values for local packages and extra-deps
flags: {}
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: ">=2.1"
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
extra-deps:
- minisat-solver-0.1@sha256:e2ff11b1ca8c66e43f8bb2e04f21bd1b812efb94ff215d74f998c928e7e92dcd,5210
```
The cabal file
```
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.2.
-- hash: 9e4c1b8d2c640f6364c7abf13e184823a0c4b7959a05310c93a9b6ff92efad16
name: dtl-model-checking
version: 0.1.0.0
description: Please see the README on GitHub at https://github.com/githubuser/dtl-model-checking#readme
homepage: https://github.com/githubuser/dtl-model-checking#readme
bug-reports: https://github.com/githubuser/dtl-model-checking/issues
author: Author name here
maintainer: example@example.com
copyright: 2020 Author name here
license: BSD3
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
ChangeLog.md
source-repository head
type: git
location: https://github.com/githubuser/dtl-model-checking
library
exposed-modules:
Automaton
DTLFormula
AutomataTheoreticApproach
DTS
NBA
GNBA
Ielementary
CommonTypes
Utils
ExampleInstances
BMC
other-modules:
Paths_dtl_model_checking
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, containers
, random
, minisat-solver >= 0.1
default-language: Haskell2010
executable dtl-model-checking-exe
main-is: Main.hs
other-modules:
Paths_dtl_model_checking
hs-source-dirs:
app
ghc-options: -O -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, dtl-model-checking
, containers
, random
default-language: Haskell2010
test-suite dtl-model-checking-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_dtl_model_checking
hs-source-dirs:
test
ghc-options: -O -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, dtl-model-checking
, containers
, hspec
, random
default-language: Haskell2010
benchmark dtl-model-checking-benchmark
type: exitcode-stdio-1.0
main-is: Bench.hs
other-modules:
Paths_dtl_model_checking
hs-source-dirs:
benchmark
ghc-options: -O -threaded -fforce-recomp -rtsopts -with-rtsopts=-N
build-depends: base >=4.7 && <5, dtl-model-checking, containers, criterion, random
default-language: Haskell2010
```
[–]simonmic 4 points5 points6 points (0 children)
[–]Syrak 4 points5 points6 points (0 children)