1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-02 23:43:01 +03:00
juvix/app
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
..
Commands Add field projections for records (#2260) 2023-08-01 09:46:22 +01:00
TopCommand Support juvix format with no argument to format a project (#2208) 2023-06-20 06:32:17 +01:00
App.hs Add main field to juvix.yaml (#2120) 2023-05-24 15:42:20 +02:00
AsmInterpreter.hs Refactor Core datastructures (#1975) 2023-04-04 18:58:05 +02:00
CommonOptions.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Evaluator.hs Print values in juvix eval (#2179) 2023-06-06 12:35:01 +02:00
GlobalOptions.hs Remove abstract (#2219) 2023-06-30 15:01:46 +02:00
Main.hs Improve error message when input path doesn't exist (#2092) 2023-05-15 11:03:09 +02:00
TopCommand.hs Add juvix clean to remove project build artifact directory (#2018) 2023-04-21 14:21:31 +02:00