serokell / o-clock

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

Verify units order for 'seriesF' function #51

Closed chshersh closed 6 years ago

chshersh commented 6 years ago

This call makes sense:

seriesF @'[Hour, Minute]

While this one doesn't:

seriesF @'[Minute, Hour]

It would be good to define some type-level predicate IsDescending using type families for ensuring more compiletime safety in seriesF function.