1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-25 08:34:10 +03:00
juvix/examples
Jan Mas Rovira bf06cb14d1
Formatter improvements (#3194)
1. Closes #3192. The first pipe is ensured in a multi-clause lambda.
3. Bugfix: Pragmas are now properly printed for deriving statements.
Previously they were never printed.
4. Record types are always declared in a new line, even if they have a
single constructor and fit in a line. I think this change improves
readability.
   ```
   -- before
   type Eq A := mkEq@{builtin isEqual eq : A -> A -> Bool};
  
   -- after
   type Eq A :=
     mkEq@{
       builtin isEqual
       eq : A -> A -> Bool;
     };
   ```
5. I've formatted the stdlib
(https://github.com/anoma/juvix-stdlib/pull/150).
6. I've refactored some code related to adding the first pipe so that it
is reused for cases, lambdas and types.
7. Now `ConstructorDef` has a proper `PrettyCode` instance and does not
need to be passed a bool indicating whether it is the only constructor
in a definition.
2024-11-29 11:49:47 +01:00
..
demo Formatter improvements (#3194) 2024-11-29 11:49:47 +01:00
midsquare Update standard library coding style according to the guidelines (#3092) 2024-10-14 15:56:54 +02:00
milestone Formatter improvements (#3194) 2024-11-29 11:49:47 +01:00