1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 17:32:00 +03:00
juvix/app/Commands/Dev
Jan Mas Rovira 4a6a7e6540
Add field projections for records (#2260)
- Closes #2258 

# Overview
When we define a type with a single constructor and one ore more fields,
a local module is generated with the same name as the inductive type.
This module contains a projection for every field. Projections can be
used as any other function.

E.g. If we have
```
type Pair (A B : Type) := mkPair {
 fst : A;
 snd : B;
};
```
Then we generate
```
module Pair;
 fst {A B : Type} : Pair A B -> A
  | (mkPair a b) := a;

 snd : {A B : Type} : Pair A B -> B
  | (mkPair a b) := b;
end;
```
2023-08-01 09:46:22 +01:00
..
Asm Add main field to juvix.yaml (#2120) 2023-05-24 15:42:20 +02:00
Core Print values in juvix eval (#2179) 2023-06-06 12:35:01 +02:00
DisplayRoot Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Geb Update to GEB version 0.3.2 (#2244) 2023-07-11 11:02:48 +02:00
Highlight Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Internal Remove abstract (#2219) 2023-06-30 15:01:46 +02:00
Parse Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Repl Add field projections for records (#2260) 2023-08-01 09:46:22 +01:00
Runtime Fix: add supported targets as option for compile commands (#1983) 2023-04-13 14:16:07 +02:00
Scope Remove --no-format option (#2121) 2023-05-24 10:46:18 +02:00
Termination Remove abstract (#2219) 2023-06-30 15:01:46 +02:00
Asm.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Core.hs Normalization by Evaluation (#2038) 2023-05-15 18:01:40 +02:00
DisplayRoot.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Geb.hs Fix Core-To-Geb translation (#1863) 2023-02-28 18:49:44 +01:00
Highlight.hs Partial incremental highlighting (#2053) 2023-05-10 13:09:48 +02:00
Internal.hs Remove abstract (#2219) 2023-06-30 15:01:46 +02:00
Options.hs Add juvix dev repl command (#1941) 2023-03-31 00:57:44 +02:00
Parse.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Runtime.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Scope.hs Finish the new pretty printing algorithm and delete the old one (#2151) 2023-06-02 13:02:35 +02:00
Termination.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00