advancedtelematic / quickcheck-state-machine

Test monadic programs using state machine based models
Other
203 stars 25 forks source link

Rename `elem` and `notElem` in Logic module to avoid name clash with Prelude #241

Closed stevana closed 5 years ago

tibi77 commented 5 years ago

Why is this necessary? The only file that is using the notElem from the Prelude is Z.hs where the Prelude module is imported with the qualifier P. Will there not be better regarding the programming style to use explicit imports (for example: use P.notElem and L.notElem respectively) than to name the function in a different way?

stevana commented 5 years ago

It's necessary for being able to import both the prelude and this library without having to hide or use qualified imports. If you want to use qualified imports, then you can still continue doing so. Other modules that are commonly used in a qualified manner, e.g. Data.Set, also have different function names, e.g. member.