-
Notifications
You must be signed in to change notification settings - Fork 258
Closed
Description
[tagged as v2.0, because this is a last opportunity to break this now before v3.0]
Why does the record
definition DivMod
not take an additional irrelevant instance
argument .{{_ : NonZero divisor}}
as part its definition?
Two potential knock-on consequences of the change:
- the entire section could then be defined in a single module (modulo fixing up the infix declarations)? (But such a refactoring could be done downstream in v2.(n+1))
- use of the specification and its implementation(s) then enforces an additional compile-time check on client modules (maybe there are pros and cons to this?)
Re: the last point. Only knock-on consequence appears to be the need to (re-)instate {{_ : NonZero divisor}}
in the type of _divMod_
in place of the current {{ NonZero divisor }}
in Data.Nat.DivMod.WithK
...