-
Notifications
You must be signed in to change notification settings - Fork 217
Preserve grouping of module items #521
Copy link
Copy link
Closed
Description
Consider this cut down human-formatted code:
let cmos_rtc_seconds = 0x00
let cmos_rtc_seconds_alarm = 0x01
let cmos_rtc_minutes = 0x02
let log_other = 0x000001
let log_cpu = 0x000002
let log_fpu = 0x000004
let cr0_pe = 1 lsl 0
let cr0_mp = 1 lsl 1
let cr0_em = 1 lsl 2Depending on the configuration, ocamlformat either drops the newlines or adds newlines between every let binding, while I'd like to preserve the grouping. I don't consider this a failure of the formatter, as I don't expect the formatter to understand how to group top-level bindings by their semantics, but I do find the human-formatted version much more readable.
Reactions are currently unavailable