summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-09-14 17:21:57 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-09-14 17:21:57 +0100
commita3661c63a076a15e0e5424630e3fedec00160139 (patch)
tree1e43eace065866f7743fe6b6c1b8aadea7ef4b9e
parent54ced85910e85112486fbbcd600841ba24a6d93e (diff)
downloadhaskell-a3661c63a076a15e0e5424630e3fedec00160139.tar.gz
Improved debugger output
It turns out that the new treatment of Integer literals means that the debugger can see an Integer value more often than before (it's a value not a thunk). That improves the debugger output; hence all these diffs.
-rw-r--r--testsuite/tests/ghci.debugger/scripts/2740.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break001.stderr7
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break001.stdout15
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break005.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stdout18
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break026.stdout30
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break027.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print002.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print003.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print003.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print005.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print008.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print012.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print013.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print014.script2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print014.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/2976.stdout2
20 files changed, 72 insertions, 88 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/2740.stdout b/testsuite/tests/ghci.debugger/scripts/2740.stdout
index c7fefaaeb2..189d95c5e4 100644
--- a/testsuite/tests/ghci.debugger/scripts/2740.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/2740.stdout
@@ -1,10 +1,10 @@
Stopped at 2740.hs:(3,1)-(4,25)
_result :: a = _
Stopped at 2740.hs:3:11-13
-_result :: a = _
-x :: a = _
-y :: a = _
-x = (_t1::a)
-y = (_t2::a)
+_result :: Integer = _
+x :: Integer = 1
+y :: Integer = 2
+x = 1
+y = 2
x = 1
y = 2
diff --git a/testsuite/tests/ghci.debugger/scripts/break001.stderr b/testsuite/tests/ghci.debugger/scripts/break001.stderr
index cb0cc93ac7..e69de29bb2 100644
--- a/testsuite/tests/ghci.debugger/scripts/break001.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break001.stderr
@@ -1,7 +0,0 @@
-
-<interactive>:1:1:
- Ambiguous type variable `t' in the constraint:
- (Show t) arising from a use of `print'
- Cannot resolve unknown runtime types: t
- Use :print or :force to determine these types
- In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break001.stdout b/testsuite/tests/ghci.debugger/scripts/break001.stdout
index e88c2fcc5c..09deeb7c1d 100644
--- a/testsuite/tests/ghci.debugger/scripts/break001.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break001.stdout
@@ -3,16 +3,17 @@ Breakpoint 1 activated at ../Test2.hs:5:1-7
Stopped at ../Test2.hs:3:1-9
_result :: t = _
Stopped at ../Test2.hs:3:7-9
-_result :: t = _
-x :: t = _
+_result :: Integer = _
+x :: Integer = 1
Stopped at ../Test2.hs:5:1-7
_result :: t = _
Stopped at ../Test2.hs:5:7
-_result :: t = _
-y :: t = _
-_result :: t = _
-y :: t = _
-y = (_t1::t)
+_result :: Integer = _
+y :: Integer = 1
+_result :: Integer = _
+y :: Integer = 1
+1
+y = 1
()
y = 1
1
diff --git a/testsuite/tests/ghci.debugger/scripts/break005.stdout b/testsuite/tests/ghci.debugger/scripts/break005.stdout
index adf9502b0a..82fc681105 100644
--- a/testsuite/tests/ghci.debugger/scripts/break005.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break005.stdout
@@ -1,9 +1,9 @@
Stopped at ../QSort.hs:(4,1)-(6,55)
_result :: [a] = _
Stopped at ../QSort.hs:5:16-51
-_result :: [a] = _
-a :: a = _
-left :: [a] = _
-right :: [a] = _
+_result :: [Integer] = _
+a :: Integer = 1
+left :: [Integer] = _
+right :: [Integer] = _
()
left = []
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stdout b/testsuite/tests/ghci.debugger/scripts/break006.stdout
index 42560877d1..0f8c8915b1 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stdout
@@ -2,19 +2,19 @@ Stopped at ../Test3.hs:(1,1)-(2,31)
_result :: [a] = _
Stopped at ../Test3.hs:2:18-31
_result :: [a] = _
-f :: t -> a = _
-x :: t = _
-xs :: [t] = [_,_]
+f :: Integer -> a = _
+x :: Integer = 1
+xs :: [Integer] = [2,3]
_result :: [a] = _
-f :: t -> a = _
-x :: t = _
-xs :: [t] = [_,_]
+f :: Integer -> a = _
+x :: Integer = 1
+xs :: [Integer] = [2,3]
y = (_t1::a)
y = 2
_result :: [Integer] = _
_t1 :: Integer = 2
-f :: t -> Integer = _
-x :: t = 1
-xs :: [t] = [_,_]
+f :: Integer -> Integer = _
+x :: Integer = 1
+xs :: [Integer] = [2,3]
y :: Integer = 2
2
diff --git a/testsuite/tests/ghci.debugger/scripts/break026.stdout b/testsuite/tests/ghci.debugger/scripts/break026.stdout
index 311c1e6bd2..444738aad4 100644
--- a/testsuite/tests/ghci.debugger/scripts/break026.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break026.stdout
@@ -1,17 +1,17 @@
Stopped at break026.hs:(5,1)-(7,35)
_result :: t1 = _
Stopped at break026.hs:5:16-22
-_result :: t1 = _
-c :: t1 = _
-go :: t1 -> [t] -> t1 = _
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t] -> Integer = _
xs :: [t] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t1 = _
f :: t1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
-_result :: t1 = _
-c :: t1 = _
-f :: t1 -> Integer -> t1 = _
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
@@ -27,17 +27,17 @@ c = 1
Stopped at break026.hs:(5,1)-(7,35)
_result :: t1 = _
Stopped at break026.hs:5:16-22
-_result :: t1 = _
-c :: t1 = _
-go :: t1 -> [t] -> t1 = _
+_result :: Integer = _
+c :: Integer = 0
+go :: Integer -> [t] -> Integer = _
xs :: [t] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t1 = _
f :: t1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
-_result :: t1 = _
-c :: t1 = _
-f :: t1 -> Integer -> t1 = _
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
@@ -50,9 +50,9 @@ f :: t1 -> Integer -> t1 = _
x :: Integer = 2
xs :: [Integer] = _
Stopped at break026.hs:7:27-31
-_result :: t1 = _
-c :: t1 = _
-f :: t1 -> Integer -> t1 = _
+_result :: Integer = _
+c :: Integer = 0
+f :: Integer -> Integer -> Integer = _
x :: Integer = 1
()
1
diff --git a/testsuite/tests/ghci.debugger/scripts/break027.stdout b/testsuite/tests/ghci.debugger/scripts/break027.stdout
index c02c534b70..fdacda8d85 100644
--- a/testsuite/tests/ghci.debugger/scripts/break027.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break027.stdout
@@ -2,8 +2,8 @@ Breakpoint 0 activated at ../QSort.hs:(4,1)-(6,55)
Stopped at ../QSort.hs:(4,1)-(6,55)
_result :: [a] = _
Stopped at ../QSort.hs:5:16-51
-_result :: [a] = _
-a :: a = _
-left :: [a] = _
-right :: [a] = _
-a :: a -- Defined at <no location info>
+_result :: [Integer] = _
+a :: Integer = 3
+left :: [Integer] = _
+right :: [Integer] = _
+a :: Integer -- Defined at <no location info>
diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
index b67ced36a6..4eda16ea26 100644
--- a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout
@@ -1,6 +1,6 @@
Breakpoint 0 activated at ../QSort.hs:5:16-51
Stopped at ../QSort.hs:5:16-51
-_result :: [a] = _
-a :: a = _
-left :: [a] = _
-right :: [a] = _
+_result :: [Integer] = _
+a :: Integer = 8
+left :: [Integer] = _
+right :: [Integer] = _
diff --git a/testsuite/tests/ghci.debugger/scripts/print002.stdout b/testsuite/tests/ghci.debugger/scripts/print002.stdout
index ab0e6f2fdb..822c69ec19 100644
--- a/testsuite/tests/ghci.debugger/scripts/print002.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print002.stdout
@@ -1,6 +1,6 @@
Just 1.2
f = Just 1.2
-i = Just (_t1::Integer)
+i = Just 10
10
i = Just 10
'a'
diff --git a/testsuite/tests/ghci.debugger/scripts/print003.script b/testsuite/tests/ghci.debugger/scripts/print003.script
index 8544f46231..f172ffb708 100644
--- a/testsuite/tests/ghci.debugger/scripts/print003.script
+++ b/testsuite/tests/ghci.debugger/scripts/print003.script
@@ -12,4 +12,4 @@ seq _t2 ()
:p t
seq _t4 ()
:p t
-:t _t7
+
diff --git a/testsuite/tests/ghci.debugger/scripts/print003.stdout b/testsuite/tests/ghci.debugger/scripts/print003.stdout
index 99a66e4bdc..e53860eeeb 100644
--- a/testsuite/tests/ghci.debugger/scripts/print003.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print003.stdout
@@ -9,7 +9,7 @@ _t3 :: [a1] = _
it :: () = ()
t :: Opaque = O (_ : _)
()
-t = O (Just [(_t4::a1),(_t5::a1)] : (_t6::[Maybe [a1]]))
+t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
()
-t = O (Just [1,(_t7::Integer)] : (_t8::[Maybe [Integer]]))
-_t7 :: Integer
+t = O (Just [1,1] : (_t5::Maybe [Integer]) :
+ (_t6::[Maybe [Integer]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print005.stdout b/testsuite/tests/ghci.debugger/scripts/print005.stdout
index f2c930a356..b193d1350f 100644
--- a/testsuite/tests/ghci.debugger/scripts/print005.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print005.stdout
@@ -1,10 +1,10 @@
Breakpoint 0 activated at ../QSort.hs:5:16-51
Stopped at ../QSort.hs:5:16-51
-_result :: [a] = _
-a :: a = _
-left :: [a] = _
-right :: [a] = _
-right = (_t1::[a])
+_result :: [Integer] = _
+a :: Integer = 8
+left :: [Integer] = _
+right :: [Integer] = _
+right = (_t1::[Integer])
()
right = []
left = (_t2::[Integer])
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.script b/testsuite/tests/ghci.debugger/scripts/print006.script
index d4c60d56a6..4afd178359 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.script
+++ b/testsuite/tests/ghci.debugger/scripts/print006.script
@@ -11,9 +11,7 @@ seq _t3 () -- The tail of the list
:p t
seq _t5 () -- The 2nd element of the list
:p t
-seq _t8 () -- The 1st element of the list inside the Just
-:p t
-seq _t11 () -- The 1st element of the outer list
+seq _t7 () -- The 1st element of the outer list
:p t
-- The 1st Just must be completely typed, as we know the type of the list \ No newline at end of file
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.stdout b/testsuite/tests/ghci.debugger/scripts/print006.stdout
index 0a91ca724b..1cf7de8a8e 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print006.stdout
@@ -4,11 +4,7 @@ t = O ((_t2::a1) : (_t3::[a1]))
()
t = O ((_t4::a2) : (_t5::a2) : (_t6::[a2]))
()
-t = O ((_t7::Maybe [a1]) : Just [(_t8::a1),(_t9::a1)] :
- (_t10::[Maybe [a1]]))
+t = O ((_t7::Maybe [Integer]) : Just [2,2] :
+ (_t8::[Maybe [Integer]]))
()
-t = O ((_t11::Maybe [Integer]) : Just [2,(_t12::Integer)] :
- (_t13::[Maybe [Integer]]))
-()
-t = O (Just [(_t14::Integer),(_t15::Integer)] :
- Just [2,(_t16::Integer)] : (_t17::[Maybe [Integer]]))
+t = O (Just [1,1] : Just [2,2] : (_t9::[Maybe [Integer]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print008.stdout b/testsuite/tests/ghci.debugger/scripts/print008.stdout
index 1b42a99ed4..08bdbf7b1d 100644
--- a/testsuite/tests/ghci.debugger/scripts/print008.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print008.stdout
@@ -3,5 +3,5 @@ _t1 :: a
()
t = O ((_t2::a1) : (_t3::[a1]))
()
-t = O (Just [(_t4::a1),(_t5::a1)] : (_t6::[Maybe [a1]]))
-_t4 :: a1
+t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
+_t4 :: [Maybe [Integer]]
diff --git a/testsuite/tests/ghci.debugger/scripts/print012.stdout b/testsuite/tests/ghci.debugger/scripts/print012.stdout
index c717acc069..905ac7656c 100644
--- a/testsuite/tests/ghci.debugger/scripts/print012.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print012.stdout
@@ -1,6 +1,6 @@
o = O (_t1::a)
()
-_t1 :: SafeList x NonEmpty
-o = O (Cons (_t4::x1) (_t5::SafeList x1 y))
+_t1 :: SafeList Integer NonEmpty
+o = O (Cons 3 (_t4::SafeList Integer y))
()
-o = O (Cons 3 (_t8::SafeList Integer y1))
+o = O (Cons 3 (Cons 6 (_t9::SafeList Integer y)))
diff --git a/testsuite/tests/ghci.debugger/scripts/print013.stdout b/testsuite/tests/ghci.debugger/scripts/print013.stdout
index 8ccfef5376..ed7e65db3c 100644
--- a/testsuite/tests/ghci.debugger/scripts/print013.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print013.stdout
@@ -1,3 +1,3 @@
-d = DictN (_t13::Integer)
+d = DictN 1
()
-d = DictN (_t26::Integer)
+d = DictN 1
diff --git a/testsuite/tests/ghci.debugger/scripts/print014.script b/testsuite/tests/ghci.debugger/scripts/print014.script
index 88fce78418..40c8bec9db 100644
--- a/testsuite/tests/ghci.debugger/scripts/print014.script
+++ b/testsuite/tests/ghci.debugger/scripts/print014.script
@@ -5,5 +5,3 @@
let e = Exist 1
:p e
-seq _t1 ()
-:p e
diff --git a/testsuite/tests/ghci.debugger/scripts/print014.stdout b/testsuite/tests/ghci.debugger/scripts/print014.stdout
index e6d9a01bd8..eba3319ebd 100644
--- a/testsuite/tests/ghci.debugger/scripts/print014.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print014.stdout
@@ -1,3 +1 @@
-e = Exist (_t1::a)
-()
e = Exist 1
diff --git a/testsuite/tests/ghci/scripts/2976.stdout b/testsuite/tests/ghci/scripts/2976.stdout
index d927ad696c..9fdc11072c 100644
--- a/testsuite/tests/ghci/scripts/2976.stdout
+++ b/testsuite/tests/ghci/scripts/2976.stdout
@@ -1,4 +1,4 @@
-test :: Integer = _
+test :: Integer = 0
test = 0
test :: Integer = 0
test :: [Char] = _