formatter_cases.json (4105B)
1 [ 2 [ 3 "shape", 4 "shape t = 0\nshape (t t) = 1\nshape _ = 2\n", 5 "shape t = 0\nshape (t t) = 1\nshape _ = 2\n" 6 ], 7 [ 8 "whole", 9 "example a{t x y} bar foo = [(x) (y)]\nexample a bar{t x y} foo = [(x) (y)]\nexample a bar foo{t x y} = [(x) (y)]\n", 10 "example a{t x y} bar foo = [(x) (y)]\nexample a bar{t x y} foo = [(x) (y)]\nexample a bar foo{t x y} = [(x) (y)]\n" 11 ], 12 [ 13 "literal", 14 "f \"a b\" x = x\nf _ (t y) = y\n", 15 "f \"a b\" x = x\nf _ (t y) = y\n" 16 ], 17 [ 18 "pin", 19 "f ^C.name = 1\nf _ = 2", 20 "f ^C.name = 1\nf _ = 2" 21 ], 22 [ 23 "comments", 24 "f (t x) = x -- = @ spaces stay\n\n-- between arms\nf _ = t\n", 25 "f (t x) = x -- = @ spaces stay\n\n-- between arms\nf _ = t\n" 26 ], 27 [ 28 "headers", 29 "!import absent as P\n!export f\nf [x | xs] = x\nf _ = t\n", 30 "!import absent as P\n!export f\nf [x | xs] = x\nf _ = t\n" 31 ], 32 [ 33 "body", 34 "f (t x) = (a : \"= -- λ\") -- tail\nf _=t\n", 35 "f (t x) = (a : \"= -- λ\") -- tail\nf _ =t\n" 36 ], 37 [ 38 "crlf", 39 "f (t x) = x\r\nf _ = t\r\n", 40 "f (t x) = x\r\nf _ = t\r\n" 41 ], 42 [ 43 "whole-spaces", 44 "f a {t x y} = x\nf _ = t\n", 45 "f a {t x y} = x\nf _ = t\n" 46 ], 47 [ 48 "lists", 49 "f [a b c] = a\nf [] = t\nf _ = t\n", 50 "f [a b c] = a\nf [] = t\nf _ = t\n" 51 ], 52 [ 53 "block-comment", 54 "f (t x) = x\n|- comment\nf fake = ignored\n-|\nf _ = t\n", 55 "f (t x) = x\n|- comment\nf fake = ignored\n-|\nf _ = t\n" 56 ], 57 [ 58 "groups", 59 "f (t x) = x\nf _ = t\ng [x | xs] = x\ng _ = t", 60 "f (t x) = x\nf _ = t\ng [x | xs] = x\ng _ = t" 61 ], 62 [ 63 "multi-arm", 64 "f (t x) = x\nf (t x y) = y\nf _ = t\n", 65 "f (t x) = x\nf (t x y) = y\nf _ = t\n" 66 ], 67 [ 68 "two-arguments", 69 "f (t x) y = x\nf _ _ = t\n", 70 "f (t x) y = x\nf _ _ = t\n" 71 ], 72 [ 73 "empty", 74 "", 75 "" 76 ], 77 [ 78 "unchanged-0", 79 "f x = x\n", 80 "f x = x\n" 81 ], 82 [ 83 "unchanged-1", 84 "a=1\nb =2\n", 85 "a=1\nb =2\n" 86 ], 87 [ 88 "unchanged-2", 89 "f (t x) = (\n x)\nf _ = t\n", 90 "f (t x) = (\n x)\nf _ = t\n" 91 ], 92 [ 93 "unchanged-3", 94 "f (t x) = x\nf _ = let\n a = t\n in a\n", 95 "f (t x) = x\nf _ = let\n a = t\n in a\n" 96 ], 97 [ 98 "unchanged-4", 99 "main = (let\n f (t x) = x\n f _ = t\n in f t)\n", 100 "main = (let\n f (t x) = x\n f _ = t\n in f t)\n" 101 ], 102 [ 103 "unchanged-5", 104 "f x y = x\nf _ = t\n", 105 "f x y = x\nf _ = t\n" 106 ], 107 [ 108 "unchanged-6", 109 "f (t x) = x\nf [x |\n xs] = t\nf _ = t\n", 110 "f (t x) = x\nf [x |\n xs] = t\nf _ = t\n" 111 ], 112 [ 113 "unchanged-7", 114 "f (t x) = x\nf (t y)\nf _ = t\n", 115 "f (t x) = x\nf (t y)\nf _ = t\n" 116 ], 117 [ 118 "unchanged-8", 119 "f (t x) = x\nf _\t= t\n", 120 "f (t x) = x\nf _\t= t\n" 121 ], 122 [ 123 "unchanged-9", 124 "f (t x) |- head comment -| = x\nf _ = t\n", 125 "f (t x) |- head comment -| = x\nf _ = t\n" 126 ], 127 [ 128 "unchanged-10", 129 "f (t x) = x\nf _ =\n", 130 "f (t x) = x\nf _ =\n" 131 ], 132 [ 133 "unchanged-11", 134 "f (t x) = x\n-- keep the whole group\nf _ = t\nf _ _ = t\n", 135 "f (t x) = x\n-- keep the whole group\nf _ = t\nf _ _ = t\n" 136 ], 137 [ 138 "unchanged-12", 139 "f \"unterminated\nf _ = t\n", 140 "f \"unterminated\nf _ = t\n" 141 ], 142 [ 143 "unchanged-13", 144 "f (t x) = \"first\nf _ = t\nlast\"\nf _ = t\n", 145 "f (t x) = \"first\nf _ = t\nlast\"\nf _ = t\n" 146 ], 147 [ 148 "generated-2", 149 "f [] = t\nf _ = t\n", 150 "f [] = t\nf _ = t\n" 151 ], 152 [ 153 "generated-4", 154 "f [] = t\nf [x0] = t\nf [x0 x1] = t\nf _ = t\n", 155 "f [] = t\nf [x0] = t\nf [x0 x1] = t\nf _ = t\n" 156 ], 157 [ 158 "generated-8", 159 "f [] = t\nf [x0] = t\nf [x0 x1] = t\nf [x0 x1 x2] = t\nf [x0 x1 x2 x3] = t\nf [x0 x1 x2 x3 x4] = t\nf [x0 x1 x2 x3 x4 x5] = t\nf _ = t\n", 160 "f [] = t\nf [x0] = t\nf [x0 x1] = t\nf [x0 x1 x2] = t\nf [x0 x1 x2 x3] = t\nf [x0 x1 x2 x3 x4] = t\nf [x0 x1 x2 x3 x4 x5] = t\nf _ = t\n" 161 ] 162 ]