Skip to content

Properly align cyclic module error

The "Module graph contains a cycle" error does some aligning to make it easier to parse what modules form a cyclic dependency. The first module is awkwardly misaligned, making it harder to parse what actually is happening:

Module graph contains a cycle:
        module ‘Foo’ (Foo.hs)
        imports module ‘Bar’ (Bar.hs)
  which imports module ‘Baz’ (Baz.hs)
  which imports module ‘Foo’ (Foo.hs)

I propose adding 8 spaces of indentation to the first item which aligns all the modules:

Module graph contains a cycle:
                module ‘Foo’ (Foo.hs)
        imports module ‘Bar’ (Bar.hs)
  which imports module ‘Baz’ (Baz.hs)
  which imports module ‘Foo’ (Foo.hs)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information