File: list_normalized.ml.ref

package info (click to toggle)
ocamlformat 0.28.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,436 kB
  • sloc: ml: 63,321; pascal: 4,769; lisp: 229; sh: 217; makefile: 121
file content (52 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
let x = [1; 2; 3; 4]

(* comments may move during normalization *)
let x =
  (* a *)
  [ 1 (* b *)
  ; (* c *)
    2
  ; 3
  ; 4
    (* d *)
    (* e *) ]
(* f *)

(* comments preserved when the normalization cannot be done (attributes) *)
let x = (* a *) 1 (* b *) :: (* c *) 2 :: 3 :: 4 (* d *) :: (* e *) ([] [@attr])
(* f *)

(* comments preserved when no normalization required *)
let x = (* a *) [(* b *) 1 (* c *); (* d *) 2; 3; 4 (* e *)] (* f *)

let (x :: []) = e

let (x :: y) = e

let [x; y] = e

let (x :: y :: ([] [@attr])) = e

let [x; (y [@attr])] = e

let (*a*) (x (*b*) :: (*c*) y (*d*)) = e

let
    (*a*)
    [ x (*b*)
    ; (*c*)
      y
      (*d*)
      (*e*) ] (*f*) =
  e

let (*a*) (x (*b*) :: (*c*) y (*d*) :: (*e*) ([] [@attr])) (*f*) = e

let
    (*a*)
    [ x (*b*)
    ; (*c*)
      (y [@attr])
      (*d*)
      (*e*) ] (*f*) =
  e