Skip to content
  • Ryan Scott's avatar
    Make -fbyte-code prevent unboxed tuples/sums from implying object code (#16876) · 4f81fab0
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    This resolves #16876 by making the explicit use of `-fbyte-code`
    prevent code that enables `UnboxedTuples` or `UnboxedSums` from
    automatically compiling to object code. This allows for a nice
    middle ground where most code that enables `UnboxedTuples`/-`Sums`
    will still benefit from automatically enabling `-fobject-code`, but
    allows power users who wish to avoid this behavior in certain corner
    cases (such as `lens`, whose use case is documented in #16876) to do
    so.
    
    Along the way, I did a little cleanup of the relevant code and
    documentation:
    
    * `enableCodeGenForUnboxedTuples` was only checking for the presence
      of `UnboxedTuples`, but `UnboxedSums` has the same complications.
      I fixed this and renamed the function to
      `enableCodeGenForUnboxedTuplesOrSums`.
    * I amended the users' guide with a discussion of these issues.
    4f81fab0