Skip to content

Implement several convenient utils #62

@chshersh

Description

@chshersh

Currently it's a little bit awkward to use o-clock in several places... This issue is devoted to collect such things:

  • Add .ghci to repository. It's not convenient to enable language extensions and add required imports manually every time when entering cabal new-repl.
  • Create time from rational time more conveniently. If you want 2/7 of day you can use one of the following ways (I don't find any of these ways convenient):
    1. Time @Day (2 % 7)
    2. timeMul (1 % 7) (day 2)
    3. fromRational @(Time Day) (2 % 7)
  • Subtract time of different units more conveniently. We have +: operator for sec 3 +: minute 3. I want something similar but for subtraction (see example in Make 'seriesF' implementation more precise #60). Unfortunately, -: operator is very popular on Hackage. So we need another convention for arithmetic operators.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions