serokell / o-clock

:hourglass: Type-safe time units in Haskell
Mozilla Public License 2.0
49 stars 6 forks source link

[#100] Add instances #101

Closed vrom911 closed 6 years ago

vrom911 commented 6 years ago

Resolves #100

vrom911 commented 6 years ago

I'm sorry I don't understand why do we need to make tests on instances?

chshersh commented 6 years ago

@vrom911 As I see now, the only non-trivial instance we have is ToJSON/FromJSON instance. It's very simple but still non-trival. So I think tests if needed then needed only for this. Typical roundtrip tests like fromJSON . toJSON ≡ id. Though, this instance uses show and read and nothing more and we already have read . show ≡ id tests so may there's no much sense in having tests for JSON while we have simple instances.