Commit e545f545 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

(cherry picked from commit d86b237d)
parent 0c932d4c
......@@ -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 ()
......@@ -437,5 +437,5 @@ test('T13677', normal, compile_fail, [''])
test('T11963', normal, compile_fail, [''])
test('T14000', normal, compile_fail, [''])
test('T11672', normal, compile_fail, [''])
test('T13929', normal, compile_fail, [''])
test('T13929', expect_broken(13929), 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