Skip to content

Parse error when trying to use multiple public libraries within mixins #6281

Closed
@chshersh

Description

@chshersh

Describe the bug

I have the following lines in my .cabal file:

  build-depends:       containers-backpack:{ int-strict, ordered-strict, unordered-strict, contrib }

  mixins:              containers-backpack:contrib (Map.Contrib.Group as Map.Contrib.Group.Int)
                                          requires (Map as Map.Int)

Here containes-backpack is a package with the public library contrib inside it. However, when trying to build this package with cabal-install I see the following error:

Errors encountered when parsing cabal file ./containers-backpack.cabal:

containers-backpack.cabal:142:43: error:
unexpected ':'
expecting "-", white space, "(", "hiding", "requires", comma or end of input

  140 |   build-depends:       containers-backpack:{ int-strict, ordered-strict, unordered-strict, contrib }
  141 | 
  142 |   mixins:              containers-backpack:contrib (Map.Contrib.Group as Map.Contrib.Group.Int)
      |                                           ^

To Reproduce

You can find full code here:

Steps to reproduce the behavior:

  1. Clone the repo.
  2. Checkout to branch from linked PR.
  3. Do cabal v2-build

Expected behavior

No parse error.

System informataion

  • Ubuntu-18.04
  • cabal-3.0.0.0
  • ghc-8.6.5 or ghc-8.8.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions