Re-export qualified?

后端 未结 2 1985
盖世英雄少女心
盖世英雄少女心 2020-12-29 20:54

suppose you have two modules like

module Foo.A where

foo = 42

and

module Foo.B where

foo = 12

and you w

2条回答
  •  一生所求
    2020-12-29 21:36

    Good question. The Haskell Report addresses this:

    Exports lists are cumulative: the set of entities exported by an export list is the union of the entities exported by the individual items of the list.

    [...]

    The unqualified names of the entities exported by a module must all be distinct (within their respective namespace).

    According to my limited Haskell knowledge I'd say it's not possible.

提交回复
热议问题