My problem is in the last line:
module A where
data A = A { f :: Int }
defaultA = A { f = 0 }
and
module B where
import A as A
data B = B { f :: Int }
bToA :: B -> A
bToA x = defaultA { A.f = f x }
gives
B.hs:8:26:
Ambiguous occurrence `f'
It could refer to either `B.f', defined at B.hs:5:13
or `A.f', imported from A at B.hs
Since i can not include B qualified within itself, what alternative is there to resolve the namespace clash? I would rather not rename the clashing function.
Edit: updated that examples.