Skip to content
Snippets Groups Projects
Commit d291bd1c authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Relax coding guideline regarding module imports

I notice imports like

    import qualified Text.PrettyPrint as Disp
          ( Doc, render, char, text )

which seem overly precise to me, when `Disp.` is only used
locally as a module prefix, and there's no other imports sharing
the same module prefix.

Instead, it should suffice to either use

    import qualified Text.PrettyPrint as Disp

or

    import Text.PrettyPrint
          ( Doc, render, char, text )

or in rare cases even

    import Text.PrettyPrint as Disp
          ( Doc, render, char, text )

Hence this relaxes the coding guidelines to allow these simpler forms
to be used.

[skip ci]
parent bb5e43f2
No related branches found
No related tags found
No related merge requests found
...@@ -212,8 +212,8 @@ Conventions ...@@ -212,8 +212,8 @@ Conventions
* For local imports (Cabal module importing Cabal module), import lists * For local imports (Cabal module importing Cabal module), import lists
are NOT required (although you may use them at your discretion.) For are NOT required (although you may use them at your discretion.) For
third-party and standard library imports, please use explicit import third-party and standard library imports, please use either qualified imports
lists. or explicit import lists.
* You can use basically any GHC extension supported by a GHC in our * You can use basically any GHC extension supported by a GHC in our
support window, except Template Haskell, which would cause support window, except Template Haskell, which would cause
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment