-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please, how to add a package name into mixin? #453
Comments
Anton-Latukha
changed the title
How to add a package name into mixin
How to add a package name into mixin?
Sep 20, 2021
Anton-Latukha
changed the title
How to add a package name into mixin?
Please, how to add a package name into mixin?
Sep 20, 2021
@Anton-Latukha I'm doing something similar with ghc-corroborate. Adding a -- package.dhall
, dependencies =
[ { name = "ghc"
, version = ">=8.0 && <8.2"
, mixin =
[ "hiding ()"
, "(TcRnTypes as TcRnTypes)"
, "(Type as Type)"
, "(TcRnTypes as Constraint)"
, "(Type as Predicate)"
]
}
] # generated from package.dhall with "dhall-hpack-yaml > package.yaml"
dependencies:
- name: ghc
version: '>=8.0 && <8.2'
mixin:
- hiding ()
- (TcRnTypes as TcRnTypes)
- (Type as Type)
- (TcRnTypes as Constraint)
- (Type as Predicate) -- generated ghc-corroborate.cabal with "dhall-hpack-cabal"
build-depends:
ghc >=8.0 && <8.2
mixins:
ghc hiding ()
, ghc (TcRnTypes as TcRnTypes)
, ghc (Type as Type)
, ghc (TcRnTypes as Constraint)
, ghc (Type as Predicate) |
I tried adding an empty string entry and this adds the dependency to the mix as-is. # package.yaml
dependencies:
- name: ghc
version: '>=8.0 && <8.2'
mixin:
- '' -- generated ghc-corroborate.cabal
build-depends:
ghc >=8.0 && <8.2
mixins:
ghc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
HPack allows to:
But into Cabal it gets translated as:
Which has unexpected behavior - any modules except main
Relude
module from the tree ofrelude
modules can not be imported.If only there was a documented way, or if I knew the way to do something like:
To put that
- relude
the second time - it all seems to work fine then if that gets possible.The text was updated successfully, but these errors were encountered: