1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-20 10:02:03 +03:00
Idris2/libs/prelude/Prelude
Zoe Stafford 1669fc351b
Refactor %builtin ()
* Stub for future 'identity' optimisation
I plan to add this later, but I'm using for now for
NaturalToInteger and IntegerToNatural

* Refactor `%builtin`
fixes 

- 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 + 

* remove %builtin from libs
Add back after next version

* Use resolved names where convenient
2021-08-03 14:19:17 +01:00
..
Basics.idr [ cleanup ] on is meant to be used with 2 arguments 2021-07-27 13:58:41 +01:00
Cast.idr [ new ] Missing integer type interfaces () 2021-06-28 20:00:10 +01:00
EqOrd.idr [ new ] Missing integer type interfaces () 2021-06-28 20:00:10 +01:00
Interfaces.idr Add foldMap to Foldable () 2021-06-01 15:05:04 +01:00
IO.idr Accept HasIO in onCollect functions 2021-07-17 14:42:34 +01:00
Num.idr [ new ] Missing integer type interfaces () 2021-06-28 20:00:10 +01:00
Ops.idr [ close ] built-in Snoc-lists [< 1, 2, 3 ] () 2021-05-20 12:56:25 +01:00
Show.idr [ new ] Missing integer type interfaces () 2021-06-28 20:00:10 +01:00
Types.idr Refactor %builtin () 2021-08-03 14:19:17 +01:00
Uninhabited.idr [prelude] Add explicit constructor to every interface 2021-05-06 18:32:51 +03:00