Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Fix redundant space in outcome printing of constructors. #455

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/res_outcome_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ let printPolyVarIdent txt =
Doc.group (
Doc.indent (
Doc.concat [
Doc.line;
Doc.softLine;
Doc.join ~sep:Doc.line (
List.mapi (fun i constructor ->
Doc.concat [
Expand Down
15 changes: 8 additions & 7 deletions tests/oprint/expected/oprint.resi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Diff: {
let string: (string, string) => bool
}
module Diff2 = Diff
type rec tree<'value> = Nil | Node(tree<'value>, 'value, tree<'value>)
type rec tree<'value> = Nil | Node(tree<'value>, 'value, tree<'value>)
type intTree = tree<int>
type rec tree2<'value> =
| Niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiil2
Expand All @@ -36,16 +36,16 @@ type rec tree4<'value> =
riiiiiiiiiiiiiiiiiiiiiiight: tree3<'value>,
})
type color = ..
type color += Blue
type color += Red | Green
type color += Blue
type color += Red | Green
type color +=
| Blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack
| Oraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaange
| Reeeeeeeeeeeeeeeeeeeed
module Expr: {
type attr = ..
type attr += private Str(string)
type attr += Int(int) | Float(float)
type attr += private Str(string)
type attr += Int(int) | Float(float)
}
module User: {
type t = {name: string, age: int}
Expand Down Expand Up @@ -449,7 +449,7 @@ module type DEVICE = {
}
let devices: Hashtbl.t<string, module(DEVICE)>
module rec A: {
type t = Leaf(string) | Node(ASet.t)
type t = Leaf(string) | Node(ASet.t)
let compare: (t, t) => int
}
and ASet: {
Expand Down Expand Up @@ -492,4 +492,5 @@ and ASet: {
let of_list: list<elt> => t
}
type emptyObject = {.}
let f: (~x: 'a=?, ~y: 'b) => option<'a>
let f: (~x: 'a=?, ~y: 'b) => option<'a>
type call = CleanStart
2 changes: 2 additions & 0 deletions tests/oprint/oprint.res
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,5 @@ and ASet: Set.S with type elt = A.t = Set.Make(A)
type emptyObject = {.}

let f = (~x=?, ~y as _) => x

type call = CleanStart