Fix CodingStyle#Warnings URLs
[ghc-hetmet.git] / compiler / coreSyn / CoreTidy.lhs
index c4e7ed9..37c6cb3 100644 (file)
@@ -7,6 +7,13 @@ This module contains "tidying" code for *nested* expressions, bindings, rules.
 The code for *top-level* bindings is in TidyPgm.
 
 \begin{code}
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
 module CoreTidy (
        tidyExpr, tidyVarOcc, tidyRule, tidyRules 
     ) where
@@ -25,7 +32,8 @@ import Name hiding (tidyNameOcc)
 import OccName
 import SrcLoc
 import Maybes
-import Util
+
+import Data.List
 \end{code}
 
 
@@ -146,13 +154,16 @@ tidyLetBndr env (id,rhs)
        -- CorePrep to turn the let into a case.
        --
        -- Similarly arity info for eta expansion in CorePrep
-       --
+       -- 
+       -- Set inline-prag info so that we preseve it across 
+       -- separate compilation boundaries
     final_id = new_id `setIdInfo` new_info
     idinfo   = idInfo id
     new_info = vanillaIdInfo
                `setArityInfo`          exprArity rhs
                `setAllStrictnessInfo`  newStrictnessInfo idinfo
                `setNewDemandInfo`      newDemandInfo idinfo
+               `setInlinePragInfo`     inlinePragInfo idinfo
 
     -- Override the env we get back from tidyId with the new IdInfo
     -- so it gets propagated to the usage sites.
@@ -173,7 +184,7 @@ tidyIdBndr env@(tidy_env, var_env) id
        -- which should save some space.
        -- But note that tidyLetBndr puts some of it back.
         ty'              = tidyType env (idType id)
-       id'               = mkUserLocal occ' (idUnique id) ty' noSrcLoc
+       id'               = mkUserLocal occ' (idUnique id) ty' noSrcSpan
                                `setIdInfo` vanillaIdInfo
        var_env'          = extendVarEnv var_env id id'
     in