Commit d86b237d authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

testsuite: Add unboxed sum to T13929

Test Plan: Validate

Reviewers: austin

Subscribers: rwbarton, thomie

GHC Trac Issues: #13929

Differential Revision: https://phabricator.haskell.org/D3993
parent acd346e3
......@@ -28,5 +28,10 @@ instance (GUnbox f rf, GUnbox g rg) => GUnbox (f :*: g) ('TupleRep '[rf, rg]) wh
-- if I remove implementation of `gunbox` it compiles successfully
gunbox (x :*: y) = (# gunbox x, gunbox y #)
instance (GUnbox f rf, GUnbox g rg) => GUnbox (f :+: g) ('SumRep '[rf, rg]) where
type GUnboxed (f :+: g) ('SumRep '[rf, rg]) = (# GUnboxed f rf | GUnboxed g rg #)
gunbox (L1 l) = (# gunbox l | #)
gunbox (R1 r) = (# | gunbox r #)
main :: IO ()
main = pure ()
......@@ -456,5 +456,5 @@ test('T11963', normal, compile_fail, [''])
test('T14000', normal, compile_fail, [''])
test('T14055', normal, compile_fail, [''])
test('T13909', normal, compile_fail, [''])
test('T13929', normal, compile_fail, [''])
test('T13929', expect_broken(13929), compile_fail, [''])
test('T14232', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment