[commit: ghc] master: White space layout only (369dd0c)

git at git.haskell.org git at git.haskell.org
Fri May 22 14:14:36 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/369dd0c61ad7b95076584016c2492594cb73cf5b/ghc

>---------------------------------------------------------------

commit 369dd0c61ad7b95076584016c2492594cb73cf5b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 22 14:33:16 2015 +0100

    White space layout only


>---------------------------------------------------------------

369dd0c61ad7b95076584016c2492594cb73cf5b
 compiler/main/TidyPgm.hs | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs
index 1c72130..e9dd8d1 100644
--- a/compiler/main/TidyPgm.hs
+++ b/compiler/main/TidyPgm.hs
@@ -1039,25 +1039,25 @@ tidyTopName mod nc_var maybe_ref occ_env id
     loc         = nameSrcSpan name
 
     old_occ     = nameOccName name
-    new_occ
-      | Just ref <- maybe_ref, ref /= id =
-          mkOccName (occNameSpace old_occ) $
-             let
-                 ref_str = occNameString (getOccName ref)
-                 occ_str = occNameString old_occ
-             in
-             case occ_str of
-               '$':'w':_ -> occ_str
-                  -- workers: the worker for a function already
-                  -- includes the occname for its parent, so there's
-                  -- no need to prepend the referrer.
-               _other | isSystemName name -> ref_str
-                      | otherwise         -> ref_str ++ '_' : occ_str
-                  -- If this name was system-generated, then don't bother
-                  -- to retain its OccName, just use the referrer.  These
-                  -- system-generated names will become "f1", "f2", etc. for
-                  -- a referrer "f".
-      | otherwise = old_occ
+    new_occ | Just ref <- maybe_ref
+            , ref /= id
+            = mkOccName (occNameSpace old_occ) $
+                   let
+                       ref_str = occNameString (getOccName ref)
+                       occ_str = occNameString old_occ
+                   in
+                   case occ_str of
+                     '$':'w':_ -> occ_str
+                        -- workers: the worker for a function already
+                        -- includes the occname for its parent, so there's
+                        -- no need to prepend the referrer.
+                     _other | isSystemName name -> ref_str
+                            | otherwise         -> ref_str ++ '_' : occ_str
+                        -- If this name was system-generated, then don't bother
+                        -- to retain its OccName, just use the referrer.  These
+                        -- system-generated names will become "f1", "f2", etc. for
+                        -- a referrer "f".
+            | otherwise = old_occ
 
     (occ_env', occ') = tidyOccName occ_env new_occ
 



More information about the ghc-commits mailing list