Closed ugeorge closed 4 years ago
Increasing priority. The Time
type is too restrictive to arithmetic operators, forcing any meaningful operation in CT to have the values of Time
as well. There should be a class TimeCompatible
or something similar, to represent types that can perform operations along with time values.
Addressed in #42 No type class though, but rather additional type constraints, aliases and instructions.
Although a good numerical representation for (continuous) time,
Rational
s are resource-consuming, and sometimes the model might accept trade-offs in precision vs. performance. A better approach would be to make Time a type class. Clear semantics need to be defined. Special care needs to be taken when instantiating e.g.Float
as time, because we lose comparison operations.