diff options
Diffstat (limited to 'testsuite/tests/overloadedrecflds/should_run/T11228.hs')
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_run/T11228.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/overloadedrecflds/should_run/T11228.hs b/testsuite/tests/overloadedrecflds/should_run/T11228.hs new file mode 100644 index 0000000000..6a90df5890 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/T11228.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE PatternSynonyms #-} + +pattern MkS { x } = [x] +pattern MkT { x, y } = (x,y) + +e :: ([Int], Int) +e = MkT { x = MkS { x = 0 }, y = 1 } + +f t@(MkT { x = MkS { x = x }, y = y }) = t { x = x + y, y = y - x } +f _ = undefined + +main = print (f e) |