mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 06:13:26 +03:00
f303e469fb
In a 'Bind', normalise the result of the first action, rather than quoting the HNF. This improves performance since the HNF could be quite big when quoted back. Ideally, we wouldn't have to quote and unquote here, and we can probably achieve this by tinkering with the evaluator. This has an unfortunate effect on the reflection002 test, in that the "typed template Idris" example now evaluates too much. But, I think the overall performance is too important for the primary motivation behind elaborator reflection. I will return to this!
9 lines
233 B
Plaintext
9 lines
233 B
Plaintext
1/1: Building power (power.idr)
|
|
Main> Main.cube : Nat -> Nat
|
|
cube = \x => mult x (mult x (mult x (const (fromInteger 1) x)))
|
|
Main> 27
|
|
Main> Main.cube' : Nat -> Nat
|
|
cube' = \x => mult (mult (plus x 0) x) x
|
|
Main> 27
|
|
Main> Bye for now!
|