Skip to content

MonadFail compatibility #21

@nomeata

Description

@nomeata

Trying to build the current package with GHC-8.6, I get:

[13 of 31] Compiling Graphics.PDF.Draw ( Graphics/PDF/Draw.hs, dist/build/Graphics/PDF/Draw.o )

Graphics/PDF/Draw.hs:256:5: error:
    • No instance for (Control.Monad.Fail.MonadFail Draw)
        arising from a do statement
        with the failable pattern ‘(x : xs)’
    • In a stmt of a 'do' block: (x : xs) <- gets supplyNames
      In the expression:
        do (x : xs) <- gets supplyNames
           modifyStrict $ \ s -> s {supplyNames = xs}
           return x
      In an equation for ‘supplyName’:
          supplyName
            = do (x : xs) <- gets supplyNames
                 modifyStrict $ \ s -> ...
                 return x
    |
256 |     (x:xs) <- gets supplyNames
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build HPDF-1.4.10 (which is required by exe:tttool from
tttool-1.8).

It would be great to have HPDF with current versions of GHC, as tttool heavily relies on it.

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