iproute icon indicating copy to clipboard operation
iproute copied to clipboard

Missing instances for some domain types

Open mirko-plowtech opened this issue 2 years ago • 0 comments

1st of all thanks for creating and sharing this library!

My concern is about the lack of some "common" instances for some of the types. Examples:

What about support these ones:

  • FromJSON and ToJSON from aeson

  • Hashable from hashable package

  • Serialize from cereal package

  • Arbitrary from Quickcheck (I saw you have them for the test module)

    ex.

    
    instance Arbitrary (AddrRange IPv4) where
        arbitrary = arbitraryIP arbitrary 32
    
  • ToADTArbitrary from quickcheck-arbitrary-adt

I'm assuming maybe you decided to not implement them (or export them) in order to keep library number of dependencies low. If is that the reason, do you think some extra lib called iproute-instances (or any other name) could be created? I mean, it would be really helpful in order to avoid wrappers or proxy for types like IPRange, IP, etc.

Either way, if you decide to implement the instances in the library or create this new one, feel free to ping me if you want or need some collaboration.

mirko-plowtech avatar Sep 30 '22 11:09 mirko-plowtech