Home > Enterprise >  Compilation error on dependency package, requiring a language extension
Compilation error on dependency package, requiring a language extension

Time:09-17

I attempted to build a project that requires RMonad package. Here is dependencies specification in my package.yaml

- dependencies:
- base >= 4.7 && < 5
- containers >= 0.5 && < 0.7
- suitable >= 0.1 && < 0.2
- rmonad >= 0.8 && < 0.9

And here is extra-deps in stack.yaml

- suitable-0.1.1
- containers-0.6.5.1
- rmonad-0.8.0.2

When building project, I got an error:

suitable > /tmp/stack-f5e19bf830e1ff79/suitable-0.1.1/src/Data/Suitable.hs:41:35: error:
suitable >     • Data constructor ‘SetConstraints’ has existential type variables, a context, or a specialised result type
suitable >         SetConstraints :: forall a. Ord a => Constraints Set a
suitable >         (Enable ExistentialQuantification or GADTs to allow this)
suitable >     • In the definition of data constructor ‘SetConstraints
suitable >       In the data instance declaration for ‘Constraints
suitable >    |
suitable > 41 | data instance Constraints Set a = Ord a => SetConstraints
suitable >    |                                   ^^^^^^^^^^^^^^^^^^^^^^^
suitable >  

However, I don't know how to enable language extension on the imported package. I only know how to activate it in my own source code. How do you fix this?

CodePudding user response:

The suitable package was last uploaded in 2011, and seems to no longer be maintained, and will no longer build. The only way of using this package would be to fix it upstream.

Even if you would want to do that, the source is stored in the Darcs version control system, so it's not so user-friendly.

But certainly good luck to whoever wants to have a go!

  • Related