Skip to content
  • sheaf's avatar
    Fix parsing & printing of unboxed sums · 34d8bc24
    sheaf authored and Marge Bot's avatar Marge Bot committed
    The pretty-printing of partially applied unboxed sums was incorrect,
    as we incorrectly dropped the first half of the arguments, even
    for a partial application such as
    
      (# | #) @IntRep @DoubleRep Int#
    
    which lead to the nonsensical (# DoubleRep | Int# #).
    
    This patch also allows users to write unboxed sum type constructors
    such as
    
      (# | #) :: TYPE r1 -> TYPE r2 -> TYPE (SumRep '[r1,r2]).
    
    Fixes #20858 and #20859.
    34d8bc24