Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : unboxed-tuple-arguments2
http://hackage.haskell.org/trac/ghc/changeset/6a27fe4138bf85718a5000256dd01e30ab934bdf >--------------------------------------------------------------- commit 6a27fe4138bf85718a5000256dd01e30ab934bdf Author: Max Bolingbroke <[email protected]> Date: Sun Mar 18 01:03:10 2012 +0000 Add test for RtClosureInspect when unboxed tuples are involved >--------------------------------------------------------------- tests/ghci.debugger/Unboxed.hs | 12 ++++++++++++ tests/ghci.debugger/scripts/all.T | 1 + tests/ghci.debugger/scripts/print035.script | 10 ++++++++++ tests/ghci.debugger/scripts/print035.stdout | 5 +++++ 4 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tests/ghci.debugger/Unboxed.hs b/tests/ghci.debugger/Unboxed.hs new file mode 100644 index 0000000..a285fef --- /dev/null +++ b/tests/ghci.debugger/Unboxed.hs @@ -0,0 +1,12 @@ +data Unboxed1 = Unboxed1 (# Int, Bool #) + +data Unboxed2 = Unboxed2 (# Int, (# Int, Bool #) #) + +o1 = Unboxed1 (# 5, True #) +o2 = Unboxed2 (# 6, (# 7, False #) #) + +force_them :: Int +force_them = x + (if b then 1 else 2) + y + z + (if c then 3 else 4) + where + Unboxed1 (# x, b #) = o1 + Unboxed2 (# y, (# z, c #) #) = o2 \ No newline at end of file diff --git a/tests/ghci.debugger/scripts/all.T b/tests/ghci.debugger/scripts/all.T index c9c5fe8..36dc47a 100644 --- a/tests/ghci.debugger/scripts/all.T +++ b/tests/ghci.debugger/scripts/all.T @@ -35,6 +35,7 @@ test('print031', normal, ghci_script, ['print031.script']) test('print032', normal, ghci_script, ['print032.script']) test('print033', normal, ghci_script, ['print033.script']) test('print034', normal, ghci_script, ['print034.script']) +test('print035', normal, ghci_script, ['print035.script']) test('break001', normal, ghci_script, ['break001.script']) test('break002', normal, ghci_script, ['break002.script']) diff --git a/tests/ghci.debugger/scripts/print035.script b/tests/ghci.debugger/scripts/print035.script new file mode 100644 index 0000000..fece23b --- /dev/null +++ b/tests/ghci.debugger/scripts/print035.script @@ -0,0 +1,10 @@ +-- Unboxed tuples in data constructor arguments need to be +-- handled correctly by RtClosureInspect + +:set -XUnboxedTuples -fobject-code +:l ../Unboxed +:p o1 +:p o2 +force_them +:p o1 +:p o2 \ No newline at end of file diff --git a/tests/ghci.debugger/scripts/print035.stdout b/tests/ghci.debugger/scripts/print035.stdout new file mode 100644 index 0000000..8f89277 --- /dev/null +++ b/tests/ghci.debugger/scripts/print035.stdout @@ -0,0 +1,5 @@ +o1 = (_t1::Unboxed1) +o2 = (_t2::Unboxed2) +23 +o1 = Unboxed1 ((#,#) 5 True) +o2 = Unboxed2 ((#,#) 6 ((#,#) 7 False)) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
