close
Skip to content

Please, how to add a package name into mixin? #453

Description

@Anton-Latukha

For example, the main way to setup relude is:
(in the form of Cabal specification):

 mixins:
    base hiding (Prelude)
  , relude (Relude as Prelude)
  , relude

Full example:

  build-depends:
      base
    , relude

  mixins:
      base hiding (Prelude)
    , relude (Relude as Prelude)
    , relude

HPack allows to:

  - name: base
    mixin:
      - hiding (Prelude)
  - name: relude
    mixin:
      - (Relude as Prelude)

But into Cabal it gets translated as:

  build-depends:
    - relude

  mixins:
      base hiding (Prelude)
    , relude (Relude as Prelude)

Which has unexpected behavior - any modules except main Relude module from the tree of relude modules can not be imported.

If only there was a documented way, or if I knew the way to do something like:

  - name: base
    mixin:
      - hiding (Prelude)
  - name: relude
    mixin:
      - (Relude as Prelude)
      - 
      # (or)
      - relude
      # (or)
    - mixin

To put that - relude the second time - it all seems to work fine then if that gets possible.

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