Skip to content
  • batterseapower's avatar
    33208bb4
    Give an error message for INLINE/SPECIALISE for missing default method · 33208bb4
    batterseapower authored
    Basically, if the user has written:
    
      class Foo a where
        bar :: a -> a
        {-# INLINE bar #-}
    
    Then we should error out because there is no default method corresponding
    to the `bar' INLINE pragma. This patch achieves this by splitting the
    signatures for a class declaration apart into two sets: one that applies
    to the defaults (INLINE, SPECIALISE), and one which defines the class itself
    (fixity, type signatures). The two sets are then renamed in different contexts.
    33208bb4
    Give an error message for INLINE/SPECIALISE for missing default method
    batterseapower authored
    Basically, if the user has written:
    
      class Foo a where
        bar :: a -> a
        {-# INLINE bar #-}
    
    Then we should error out because there is no default method corresponding
    to the `bar' INLINE pragma. This patch achieves this by splitting the
    signatures for a class declaration apart into two sets: one that applies
    to the defaults (INLINE, SPECIALISE), and one which defines the class itself
    (fixity, type signatures). The two sets are then renamed in different contexts.
Loading