mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
1669fc351b
* Stub for future 'identity' optimisation I plan to add this later, but I'm using for now for NaturalToInteger and IntegerToNatural * Refactor `%builtin` fixes #1799 - automatically optimise all Natural shaped things - NaturalToInteger and IntegerToNatural now use new `Identity` flag (internal use only for now) which signals the function is identity at runtime * Use NaturalToInteger and IntegerToNatural for Nat and Fin Also define show fin in terms of finToInteger, for speed * Fix name handling for %builtin * [ tests ] fixes + #1799 * remove %builtin from libs Add back after next version * Use resolved names where convenient
13 lines
351 B
Plaintext
13 lines
351 B
Plaintext
1/1: Building Test (Test.idr)
|
|
Error: More than 1 non-erased arguments found for finToInteger.
|
|
|
|
Test:11:1--11:39
|
|
07 | finToInteger : {k : _} -> Fin k -> Integer
|
|
08 | finToInteger FZ = 0
|
|
09 | finToInteger (FS k) = 1 + finToInteger k
|
|
10 |
|
|
11 | %builtin NaturalToInteger finToInteger
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
Main> Bye for now!
|