Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build examples using Cabal #20

Open
yurigba opened this issue Nov 21, 2022 · 0 comments
Open

Cannot build examples using Cabal #20

yurigba opened this issue Nov 21, 2022 · 0 comments

Comments

@yurigba
Copy link

yurigba commented Nov 21, 2022

I have been trying to build the lib with Cabal, with the following specifications:

cabal-install: 3.8.1.0
ghc: 9.2.4 (also tried with 8.6.5)

By pulling the commit 331a6e2 (master) I have ran

cabal configure -f examples

and then

cabal build

and ran on the following problem:

exe/OGRInfo.hs:21:3: error:
    • No instance for (MonadFail (GDAL s))
        arising from a do statement
        with the failable pattern ‘[fname, nameStr]’
    • In a stmt of a 'do' block: [fname, nameStr] <- liftIO getArgs
      In the second argument of ‘($)’, namely
        ‘do [fname, nameStr] <- liftIO getArgs
            let name = T.pack nameStr
            ds <- OGR.openReadOnly fname
            l <- OGR.getLayerByName name ds
            ....’
      In the second argument of ‘($)’, namely
        ‘runGDAL_
           $ do [fname, nameStr] <- liftIO getArgs
                let name = T.pack nameStr
                ds <- OGR.openReadOnly fname
                l <- OGR.getLayerByName name ds
                ....’
   |
21 |   [fname, nameStr] <- liftIO getArgs
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I think this is easy to fix this but I am not yet proficient with Haskell. I couldn't find the correct pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant