summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-08-24 08:14:15 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-08-24 10:31:25 +0100
commit184a569c5f5fe6e2eed73b2cff35722918c44efd (patch)
treee798334dea7d105ab07b9be7e03a16b7602dd6a5 /testsuite/tests/ghci.debugger
parent14d88380ecb909e7032598aaad4efebb72561784 (diff)
downloadhaskell-184a569c5f5fe6e2eed73b2cff35722918c44efd.tar.gz
Clean up TcHsSyn.zonkEnv
Triggered by Trac #15552, I'd been looking at ZonkEnv in TcHsSyn. This patch does some minor refactoring * Make ZonkEnv into a record with named fields, and use them. (I'm planning to add a new field, for TyCons, so this prepares the way.) * Replace UnboundTyVarZonker (a higer order function) with the simpler and more self-descriptive ZonkFlexi data type, below. It's just much more perspicuous and direct, and (I suspect) a tiny bit faster too -- no unknown function calls. data ZonkFlexi -- See Note [Un-unified unification variables] = DefaultFlexi -- Default unbound unificaiton variables to Any | SkolemiseFlexi -- Skolemise unbound unification variables -- See Note [Zonking the LHS of a RULE] | RuntimeUnkFlexi -- Used in the GHCi debugger There was one knock-on effect in the GHCi debugger -- the RuntimeUnkFlexi case. Somehow previously, these RuntimeUnk variables were sometimes getting SystemNames (and hence printed as 'a0', 'a1', etc) and sometimes not (and hence printed as 'a', 'b' etc). I'm not sure precisely why, but the new behaviour seems more uniform, so I just accepted the (small) renaming wibbles in some ghci.debugger tests. I had a quick look at perf: any changes are tiny.
Diffstat (limited to 'testsuite/tests/ghci.debugger')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print003.stdout10
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print008.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print010.stdout4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print012.stdout6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print019.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print034.stdout2
7 files changed, 18 insertions, 18 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/print003.stdout b/testsuite/tests/ghci.debugger/scripts/print003.stdout
index 74f18d264b..23b0543c1f 100644
--- a/testsuite/tests/ghci.debugger/scripts/print003.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print003.stdout
@@ -1,13 +1,13 @@
-t = O (_t1::a)
+t = O (_t1::a0)
t :: Opaque = O _
-_t1 :: a = _
+_t1 :: a0 = _
()
-t = O ((_t2::a1) : (_t3::[a1]))
+t = O ((_t2::a0) : (_t3::[a0]))
t :: Opaque = O (_ : _)
_t1 :: [a] = _ : _
it :: () = ()
-_t3 :: [a1] = _
-_t2 :: a1 = _
+_t3 :: [a0] = _
+_t2 :: a0 = _
()
t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
()
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.stdout b/testsuite/tests/ghci.debugger/scripts/print006.stdout
index 1cf7de8a8e..e508e68c34 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print006.stdout
@@ -1,8 +1,8 @@
-t = O (_t1::a)
+t = O (_t1::a0)
()
-t = O ((_t2::a1) : (_t3::[a1]))
+t = O ((_t2::a0) : (_t3::[a0]))
()
-t = O ((_t4::a2) : (_t5::a2) : (_t6::[a2]))
+t = O ((_t4::a1) : (_t5::a1) : (_t6::[a1]))
()
t = O ((_t7::Maybe [Integer]) : Just [2,2] :
(_t8::[Maybe [Integer]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print008.stdout b/testsuite/tests/ghci.debugger/scripts/print008.stdout
index 08bdbf7b1d..4cfb5ba7df 100644
--- a/testsuite/tests/ghci.debugger/scripts/print008.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print008.stdout
@@ -1,7 +1,7 @@
-t = O (_t1::a)
-_t1 :: a
+t = O (_t1::a0)
+_t1 :: a0
()
-t = O ((_t2::a1) : (_t3::[a1]))
+t = O ((_t2::a0) : (_t3::[a0]))
()
t = O (Just [1,1] : (_t4::[Maybe [Integer]]))
_t4 :: [Maybe [Integer]]
diff --git a/testsuite/tests/ghci.debugger/scripts/print010.stdout b/testsuite/tests/ghci.debugger/scripts/print010.stdout
index b390d255c8..dd75dc246c 100644
--- a/testsuite/tests/ghci.debugger/scripts/print010.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print010.stdout
@@ -1,6 +1,6 @@
-o = O (_t1::a)
+o = O (_t1::a0)
()
-o = O ((_t2::a1) : (_t3::[a1]))
+o = O ((_t2::a0) : (_t3::[a0]))
()
3
o = O [0,(_t4::Integer),(_t5::Integer),(_t6::Integer)]
diff --git a/testsuite/tests/ghci.debugger/scripts/print012.stdout b/testsuite/tests/ghci.debugger/scripts/print012.stdout
index 905ac7656c..e77bb39b15 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)
+o = O (_t1::a0)
()
_t1 :: SafeList Integer NonEmpty
-o = O (Cons 3 (_t4::SafeList Integer y))
+o = O (Cons 3 (_t4::SafeList Integer y0))
()
-o = O (Cons 3 (Cons 6 (_t9::SafeList Integer y)))
+o = O (Cons 3 (Cons 6 (_t9::SafeList Integer y0)))
diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stdout b/testsuite/tests/ghci.debugger/scripts/print019.stdout
index aea474019d..932fd540c3 100644
--- a/testsuite/tests/ghci.debugger/scripts/print019.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print019.stdout
@@ -1,4 +1,4 @@
-a = O (_t1::a)
+a = O (_t1::a0)
b = O (_t2::a1)
()
_t1 = 'a'
diff --git a/testsuite/tests/ghci.debugger/scripts/print034.stdout b/testsuite/tests/ghci.debugger/scripts/print034.stdout
index 5d83c8c9b7..f497209e87 100644
--- a/testsuite/tests/ghci.debugger/scripts/print034.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print034.stdout
@@ -1,4 +1,4 @@
-o = O (_t1::a)
+o = O (_t1::a0)
()
_t1 :: SafeList Bool NonEmpty
o = O (One False (_t4::SafeList Bool Empty))