serokell / o-clock

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

Add 'doctest' to 'o-clock' #56

Closed chshersh closed 6 years ago

chshersh commented 6 years ago

Probably this will require some changes in documentation. But I still think it's a good idea to have tests with doctest. After adding such tests, we can remove duplicating tests from our test suite.

chshersh commented 6 years ago

Some doctests will be hard to maintain until this issue is resolved:

Examples:

  1. https://github.com/serokell/o-clock/blob/c76f25824f8aeb8664eae2a5f55d82ad6b189add/src/Time/Units.hs#L370
  2. https://github.com/serokell/o-clock/blob/c76f25824f8aeb8664eae2a5f55d82ad6b189add/src/Time/Units.hs#L387
chshersh commented 6 years ago

This is no longer blocked. According to this comment we can just use another prompt: