mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 14:13:27 +03:00
485f6e7920
* Closes #2453 * Closes #2432 * Any nonnegative literal `n` is replaced with `fromNat {_} {{_}} n` where `fromNat` is the builtin conversion function defined in the `Natural` trait in `Stdlib.Trait.Natural`. * Any negative literal `-n` is replaced with `fromInt {_} {{_}} -n` where `fromInt` is the builtin conversion function defined in the `Integral` trait in `Stdlib.Trait.Integral`. * Before resolving instance holes, it is checked whether the type holes introduced for `fromNat` and `fromInt` have been inferred. If not, an attempt is made to unify them with `Nat` or `Int`. This allows to type-check e.g. `1 == 1` (there is no hint in the context as to what the type of `1` should be, so it is decided to be `Nat` after inferring the hole fails). |
||
---|---|---|
.. | ||
negative | ||
positive |