1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/app/Commands
Łukasz Czajka 8aa54ecc28
Inlining (#2036)
* Closes #1989
* Adds optimization phases to the pipline (specified by
`opt-phase-eval`, `opt-phase-exec` and `opt-phase-geb` transformations).
* Adds the `-O` option to the `compile` command to specify the
optimization level.
* Functions can be declared for inlining with the `inline` pragma:
   ```
   {-# inline: true #-}
   const : {A B : Type} -> A -> B -> A;
   const x _ := x;
   ```
By default, the function is inlined only if it's fully applied. One can
specify that a function (partially) applied to at least `n` explicit
arguments should be inlined.
   ```
   {-# inline: 2 #-}
   compose : {A B C : Type} -> (B -> C) -> (A -> B) -> A -> C;
   compose f g x := f (g x);
   ```
Then `compose f g` will be inlined, even though it's not fully applied.
But `compose f` won't be inlined.
* Non-recursive fully applied functions are automatically inlined if the
height of the body term does not exceed the inlining depth limit, which
can be specified with the `--inline` option to the `compile` command.
* The pragma `inline: false` disables automatic inlining on a
per-function basis.
2023-05-15 17:27:05 +02:00
..
Compile Fix: add supported targets as option for compile commands (#1983) 2023-04-13 14:16:07 +02:00
Dev Inlining (#2036) 2023-05-15 17:27:05 +02:00
Doctor Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Eval Print JuvixCore correctly (#1875) 2023-03-15 16:41:39 +01:00
Extra Inlining (#2036) 2023-05-15 17:27:05 +02:00
Format Make format command's filepath optional (#2028) 2023-04-27 17:33:08 +02:00
Html Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Repl Pretty print JuvixCore values consistently with Juvix syntax (#1988) 2023-04-12 12:52:40 +02:00
Typecheck Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Base.hs Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Clean.hs Add juvix clean to remove project build artifact directory (#2018) 2023-04-21 14:21:31 +02:00
Compile.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Dev.hs Add juvix dev repl command (#1941) 2023-03-31 00:57:44 +02:00
Doctor.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Eval.hs Test core to geb translation (#1865) 2023-03-27 15:32:03 +02:00
Format.hs Make format command's filepath optional (#2028) 2023-04-27 17:33:08 +02:00
Html.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Init.hs Add juvix global project under xdg directory and other improvements (#1963) 2023-04-13 11:27:39 +02:00
Repl.hs Support module imports in Juvix REPL (#2029) 2023-05-08 12:23:15 +02:00
Typecheck.hs Update typecheck command to check for coverage (#1952) 2023-03-30 19:36:38 +02:00