The same name for module and constructor
Oktai15 opened this issue · comments
Line 6 and 12:
import Hedgehog (Gen, MonadTest, Property, assert, forAll, property, (===))
import qualified Hedgehog.Gen as Gen
We see the same name Gen
-- as module and as constructor. It isn't error, but it is okay concerning haskell-style?
@Oktai15 It's completely okay. Type names and module qualifications are used in different places so compiler have no problems with it. Type like Gen
is used often, so I don't want to write Gen.Gen
instead of just Gen
. But there're a lot of other functions from Hedgehog.Gen
module which can have collisions. Every hedgehog
tutorial and blog post imports Hedgehog.Gen
in qualified manner. And personally I see a lot of sense in it.