Unactionable core lint warning due to floating out
I was looking through the build log to try and make it a bit less noisy by removing some warnings. There were quite a lot of core lint warnings which complain about INLINE progams on loop breakers. However, sometimes these bindings are not marked INLINE at the source level but by GHC itself.
cmmDebugLink :: [Label] -> [DebugBlock] -> [DebugBlock]
cmmDebugLink labels blocks = map link blocks
where blockPos :: LabelMap Int
blockPos = mapFromList $ flip zip [0..] labels
link block = block { dblPosition = mapLookup (dblLabel block) blockPos
, dblBlocks = map link (dblBlocks block)
}
For example, in this function, link
gets floated out to the top level and then marked as INLINE
even though it is self-recursive. This causes the following warning:
*** Core Lint warnings : in result of CorePrep ***
5170 <no location info>: warning:
5171 [RHS of link_slxp :: DebugBlock -> DebugBlock]
5172 INLINE binder is (non-rule) loop breaker: link_slxp
5173
But because it's generated by the compiler, there isn't a sensible way to suppress the warning.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |