diff options
author | sheaf <sam.derbyshire@gmail.com> | 2022-01-11 10:42:17 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-11 19:42:07 -0500 |
commit | 34d8bc24e33aa373acb6fdeef51427d968f28c0c (patch) | |
tree | 4eb89724f1b4e9e24ac3dc315497a5071ef463ef /compiler/Language/Haskell/Syntax | |
parent | addf8e544841a3f7c818331e47fa89a2cbfb7b29 (diff) | |
download | haskell-34d8bc24e33aa373acb6fdeef51427d968f28c0c.tar.gz |
Fix parsing & printing of unboxed sums
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.
Diffstat (limited to 'compiler/Language/Haskell/Syntax')
-rw-r--r-- | compiler/Language/Haskell/Syntax/Expr.hs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs index e51e327866..e6ce12f8ae 100644 --- a/compiler/Language/Haskell/Syntax/Expr.hs +++ b/compiler/Language/Haskell/Syntax/Expr.hs @@ -1635,7 +1635,6 @@ data HsBracket p | TypBr (XTypBr p) (LHsType p) -- [t| type |] | VarBr (XVarBr p) Bool (LIdP p) -- True: 'x, False: ''T - -- (The Bool flag is used only in pprHsBracket) | TExpBr (XTExpBr p) (LHsExpr p) -- [|| expr ||] | XBracket !(XXBracket p) -- Extension point; see Note [Trees That Grow] -- in Language.Haskell.Syntax.Extension |