This website requires JavaScript.
Explore
Help
Sign In
anoma
/
juvix
Watch
1
Star
1
Fork
0
You've already forked juvix
mirror of
https://github.com/anoma/juvix.git
synced
2024-12-14 17:32:00 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
a0bcacb0fe
juvix
/
tests
/
positive
/
Inductive.juvix
4 lines
36 B
Plaintext
Raw
Normal View
History
Unescape
Escape
[tests] setup step-wise positive tests
2022-02-18 15:01:42 +03:00
module Inductive;
Improve formatting of single-constructor types and records (#2342) - Closes #2331. The rules implemented in this pr are as follows. 1. If a type definition has only one constructor, no pipe is added. The constructor is printed in the same line if it fits. 2. If a constructor is a record with a single field, the field is printed in the same line if it fits. If the constructor has multiple fields, they are printed aligned and indented after a line break. Examples: ``` type T := constructT : T; type T-wrapper := mkWrapper {unwrap : T}; type EnumRecord := | --- doc for C1 C1 { c1a : T; c1b : T } | C2 { c2a : T; c2b : T }; ```
2023-09-07 17:20:14 +03:00
type T := t : T;
Reference in New Issue
Copy Permalink