White space layout only
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 May 2015 13:33:16 +0000 (14:33 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 May 2015 14:05:21 +0000 (15:05 +0100)
compiler/main/TidyPgm.hs

index 1c72130..e9dd8d1 100644 (file)
@@ -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