haskelly-dev / Haskelly

Haskelly is a VS Code extension that provides complete support for casual and expert Haskell development.
https://marketplace.visualstudio.com/items?itemName=UCL.haskelly
GNU General Public License v3.0
152 stars 17 forks source link

Install dependency issue #72

Closed ghita closed 6 years ago

ghita commented 6 years ago

I try to install on Win, Haskell Platform for Windows is 8.2.2

stack install intero QuickCheck stack-run

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:

Plan construction failed.

portenez commented 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
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
portenez commented 6 years ago

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.

martrik commented 6 years ago

Thanks for replying @portenez. I assume we can close this issue now.