mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 14:13:27 +03:00
34b5a14935
* Closes #2416 * Closes #2401 * Avoids generating identical specialisations by keeping a specialisation signature for each specialised function application. * Allows to specialise on a per-trait or per-instance basis: ``` {-# specialize: true #-} trait type Natural N := mkNatural { + : N -> N -> N; * : N -> N -> N; fromNat : Nat -> N; }; ``` or ``` {-# specialize: true #-} instance naturalNatI : Natural Nat := ... ``` * The above `specialize: bool` pragma actually works with any type or function. To be able to simultaneously specify the boolean specialisation flag and specialisation arguments, one can use `specialize-args: [arg1, .., argn]` which works like `specialize: [arg1, .., argn]`. |
||
---|---|---|
.. | ||
negative | ||
positive |