haskell - Re-export qualified - how to solve it nowadays, any solution? -
this question has answer here:
- re-export qualified? 2 answers
i have same issue described in question re-export qualified?
module foo.a foo = 42and
module foo.b foo = 12and want write super module
module foo ( module foo.a , module foo.b ) import foo.a import foo.bwhich re-exports modules, name clash.
it asked 5 years ago, suppose there might have been changes since then. have there been any? if not, there's still no solution that?
i not consider lens resolving it.
update:
there can plenty of functions foo in each module (foo1, foo2, etc) , want use them both modules. there can datas same member names in each module, after all.
so hiding isn't solution.
there no new solution, there still solution. first you, 1 foo can exported have decide 1 want export bare foo. need hide , alias other one.
module foo ( module foo.a , module foo.b , bfoo ) import foo.a import foo.b hiding (foo) import qualified b b bfoo = b.foo ok, it's not elegant it's workaround if have to.
Comments
Post a Comment