msakai / data-interval

Interval datatype, interval arithmetic, and interval-based containers for Haskell
Other
21 stars 9 forks source link

remove Generic instances from Interval and IntegerInterval #16

Closed msakai closed 5 years ago

msakai commented 5 years ago

@Bodigrim, sorry, but I'd like to revert the introduction of Generic instances of Interval and IntegerInterval. Because those instances reveal internal representations and type-class instances are exported/imported implicitly.

Note that, for example, container data types of containers package do not implement Generic instances.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.2%) to 90.26% when pulling 7192ed4c2c21c78c89cfa0f73ae55927fceed39b on feature/remove-generic-instances into 2f7c56097c44c2f3ef5db93747903498851300df on master.

Bodigrim commented 5 years ago

I am not quite convinced that this particular breach of abstraction is worth to go any length, but if you feel it important, let it be so.

msakai commented 5 years ago

I see. I agree with you that the breach of abstraction not so important issue, but as it's easy not to define Generic instance, I'd like to do it like containers package.