Skip to content

Inline and Noinline pragmas ignored for instance functions

An example source file which triggers the incorrect behaviour follows. I am currently unclear whether the effected inline and noinline pragmas are actually ignored by the simplifier or whether the inline rule shadowing warning is fired incorrectly.

class A a where
  (>>#) :: a -> a -> a

instance A (Maybe a) where
  {-# NOINLINE (>>#) #-}
  a >># b = undefined

{-# RULES
"example" forall (a :: Maybe Int) (b :: Maybe Int) . a >># b = Just 4
 #-}
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information