Skip to content
  • Simon Peyton Jones's avatar
    Improve the desugaring of -XStrict · 46368868
    Simon Peyton Jones authored
    Trac #14035 showed that -XStrict was generating some TERRIBLE
    desugarings, espcially for bindings with INLINE pragmas. Reason: with
    -XStrict, all AbsBinds (even for non-recursive functions) went via the
    general-case deguaring for AbsBinds, namely "generate a tuple and
    select from it", even though in this case there was only one variable
    in the tuple.  And that in turn interacts terribly badly with INLINE
    pragmas.
    
    This patch cleans things up:
    
    * I killed off AbsBindsSig completely, in favour of a boolean flag
      abs_sig in AbsBinds.  See Note [The abs_sig field of AbsBinds]
    
      This allowed me to delete lots of code; and instance-method
      declarations can enjoy the benefits too.  (They could have
      before, but no one had changed them to use AbsBindsSig.)
    
    * I refactored all the AbsBinds handling in DsBinds into a new
      function DsBinds.dsAbsBinds.  This allowed me to handle the
      strict case uniformly
    46368868