Skip to content

Cannot build examples using Cabal #20

Description

@yurigba

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions