Inlining the single method of a class can shadow rules
This shows up in template-haskell
, module Language.Haskell.TH.Syntax
, where the single method of the Lift
class:
class Lift t where
lift :: t -> Q Exp
has a RULE
:
{-# RULES "TH:liftString" lift = \s -> return (LitE (StringL s)) #-}
There is currently no way of preventing lift
from being inlined.
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |