[project @ 2000-07-07 10:35:32 by simonmar]
[ghc-hetmet.git] / ghc / compiler / basicTypes / IdInfo.lhs
index c94e81b..f73ba4f 100644 (file)
@@ -45,6 +45,7 @@ module IdInfo (
        -- Inline prags
        InlinePragInfo(..), 
        inlinePragInfo, setInlinePragInfo, pprInlinePragInfo,
+       isNeverInlinePrag, neverInlinePrag,
 
        -- Occurrence info
        OccInfo(..), isFragileOccInfo,
@@ -289,6 +290,7 @@ data ArityInfo
                        -- functions in the module being compiled.  Their arity
                        -- might increase later in the compilation process, if
                        -- an extra lambda floats up to the binding site.
+  deriving( Eq )
 
 seqArity :: ArityInfo -> ()
 seqArity a = arityLowerBound a `seq` ()
@@ -322,8 +324,19 @@ data InlinePragInfo
   = NoInlinePragInfo
   | IMustNotBeINLINEd Bool             -- True <=> came from an INLINE prag, False <=> came from a NOINLINE prag
                      (Maybe Int)       -- Phase number from pragma, if any
+  deriving( Eq )
        -- The True, Nothing case doesn't need to be recorded
 
+       -- SEE COMMENTS WITH CoreUnfold.blackListed on the
+       -- exact significance of the IMustNotBeINLINEd pragma
+
+isNeverInlinePrag :: InlinePragInfo -> Bool
+isNeverInlinePrag (IMustNotBeINLINEd _ Nothing) = True
+isNeverInlinePrag other                                = False
+
+neverInlinePrag :: InlinePragInfo
+neverInlinePrag = IMustNotBeINLINEd True{-should be False? --SDM -} Nothing
+
 instance Outputable InlinePragInfo where
   -- This is now parsed in interface files
   ppr NoInlinePragInfo = empty