Skip to content

Minimise diff in module header #409

@steshaw

Description

@steshaw

Hi, I was just reading the first release announcement. What do you think about changing:

module Ormolu
  ( ormolu,
    ormoluFile,
    ormoluStdin,
    -- ...
    withPrettyOrmoluExceptions,
  )
where

to:

module Ormolu (
  ormolu,
  ormoluFile,
  ormoluStdin,
  -- ...
  withPrettyOrmoluExceptions,
) where

It would help to minimie diffs when adding an export that would appear before ormolu, say normalise. I also like how the indentation is minimised — now the exports have just one level of indentation rather than two.

diff --git a/Ormolu.hs b/Ormolu.hs
index b039aab..fddbdc1 100644
--- a/Ormolu.hs
+++ b/Ormolu.hs
@@ -1,5 +1,6 @@
 module Ormolu
-  ( ormolu,
+  ( normalise,
+    ormolu,
     ormoluFile,
     ormoluStdin,
     -- ...

compared with:

diff --git a/Ormolu.hs b/Ormolu.hs
index d263f20..84b386c 100644
--- a/Ormolu.hs
+++ b/Ormolu.hs
@@ -1,4 +1,5 @@
 module Ormolu (
+  normalise,
   ormolu,
   ormoluFile,
   ormoluStdin,

Metadata

Metadata

Assignees

No one assigned

    Labels

    styleNitpicking and things related to purely visual aspect for formatting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions