Open jfmengels opened 1 year ago
Quick Summary: It is possible to shadow types, even though this is discouraged, and usually a compiler error
import A exposing (SomeType) import B exposing (SomeType) a : SomeType a = B.value
module A exposing (SomeType, value) type SomeType = SomeType value = SomeType
module B exposing (SomeType, value) type SomeType = SomeType value = SomeType
This can be confusing, because it is not clear which SomeType is actually chosen. The order of imports seem to be deciding this.
SomeType
This kind of shadowing is not as problematic as for functions or values, but I think there is value in keeping this consistent.
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources.
Quick Summary: It is possible to shadow types, even though this is discouraged, and usually a compiler error
SSCCE
Additional Details
This can be confusing, because it is not clear which
SomeType
is actually chosen. The order of imports seem to be deciding this.This kind of shadowing is not as problematic as for functions or values, but I think there is value in keeping this consistent.