Commits

Peter Szilagyi committed 8df784a

Added a couple more examples from Ron.

  • Participants
  • Parent commits c91ca1e

Comments (0)

Files changed (1)

File tuareg-bugs/tuareg-indentation-bugs.ml

 let x =
   { x with
     foo = 3
-    ; bar = 5
+    ; bar = 5                           (* should be 2 left *)
   }
 
 let x =
   { (* blah blah blah *)
     foo = 3
-    ; bar = 5
+    ; bar = 5                           (* should be 2 left *)
   }
 ;;
 
     f x
     y z (* should be two spaces to the right *)
 
+(* yminsky: A small indentation bug I've seen a fair number of times.  Ideally, this: *)
+let should_check_can_sell_and_marking regulatory_regime =
+  match z with
+  | `foo
+    -> some_function
+    argument                            (* should be indented 5 right *)
+(* so it would be more similar to this: *)
+let z =
+  some_function
+    argument
+
 (* -------------------------------------------------------------------------- *)
 
 let () =
     y
 ;;
 
+(* yminsky: This: *)
+let z =
+  some_function
+  <:sexp_of<foo>>                       (* should be indented 2 right *)
+;;
+(* so it works the same as this: *)
+let z =
+  some_function
+    argument
+
 (* -------------------------------------------------------------------------- *)
 
 (* dwu *)
 type t= {
   foo : int;
   bar : string; (* CR mburns: float? *)
+  baz : string;
 }