Closed ghita closed 6 years ago
I was able to get passed this by adding the conduit version in the stack.yml
.
Like so:
extra-deps:
- conduit-extra-1.1.17
However, I still wasn't able to a make it work because of another problem:
/private/var/folders/kz/2l_fd8_13t7bftwqhcz6ms500000gq/T/stack32154/stack-run-0.1.1.4/src/Main.hs:84:5: error:
• Couldn't match type ‘Distribution.Types.UnqualComponentName.UnqualComponentName’
with ‘[Char]’
Expected type: IO [String]
Actual type: IO
[Distribution.Types.UnqualComponentName.UnqualComponentName]
• In a stmt of a 'do' block: return $ getExecutables pkgParseResult
In the expression:
do pr <- fromMaybe (error "No project root found")
<$> getCabalProjectRootCurrent
cfp <- fromMaybe (error "No cabal file found")
<$>
(find ((== ".cabal") . takeExtension) <$> getDirectoryContents pr)
pkgParseResult <- getPackageDescription (pr </> cfp)
return $ getExecutables pkgParseResult
In an equation for ‘getExecutables’:
getExecutables
= do pr <- fromMaybe (error "No project root found")
<$> getCabalProjectRootCurrent
cfp <- fromMaybe (error "No cabal file found")
<$>
(find ((== ".cabal") . takeExtension) <$> getDirectoryContents pr)
pkgParseResult <- getPackageDescription (pr </> cfp)
....
where
getPackageDescription p = parsePackageDescription <$> readFile p
getExecutables (ParseFailed _) = error "Failed to parse cabal file"
getExecutables (ParseOk _ gpd)
= case condExecutables gpd of
[] -> error "No executables found"
ds -> map fst ds
|
84 | return $ getExecutables pkgParseResult
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This seems to be a stack-run
issue.
https://github.com/yamadapc/stack-run/issues/10
You can install stack-run
globally following the instructions in the github link above.
Thanks for replying @portenez. I assume we can close this issue now.
I try to install on Win, Haskell Platform for Windows is 8.2.2
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for stack-run-0.1.1.4: conduit-extra-1.2.3.2 from stack configuration does not match >=1.1 && <1.2 (latest matching version is 1.1.17) needed since stack-run is a build target.
Some potential ways to resolve this:
conduit-extra-1.1.17
Set 'allow-newer: true' to ignore all version constraints and build anyway.
You may also want to try using the 'stack solver' command.
Plan construction failed.