summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-21 18:36:08 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-02 03:41:37 -0500
commitbeed7c3e7c0703089a9ba4321bd3a2e442213fad (patch)
treeb8bc1a9e0f4b2926fd29becf4985eb9cff556e3c /testsuite/driver
parent2b113fc957a3fb6eafd10ad41a7caf11009ef4eb (diff)
downloadhaskell-beed7c3e7c0703089a9ba4321bd3a2e442213fad.tar.gz
testsuite: Fix location of typing_stubs module
This should fix the build on Debian 8.
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/typing_stubs.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/driver/typing_stubs.py b/testsuite/driver/typing_stubs.py
new file mode 100644
index 0000000000..6f17b5a35c
--- /dev/null
+++ b/testsuite/driver/typing_stubs.py
@@ -0,0 +1,23 @@
+# Stub definitions for things provided by the typing package
+# for use by older Python versions.
+
+import collections
+
+class Dummy:
+ def __getitem__(self, *args):
+ return None
+
+List = Dummy()
+Tuple = Dummy()
+Set = Dummy()
+TextIO = Dummy()
+Iterator = Dummy()
+Callable = Dummy()
+Optional = Dummy()
+Dict = Dummy()
+Union = Dummy()
+Any = Dummy()
+
+NewType = lambda name, ty: ty
+def NamedTuple(name, fields):
+ return collections.namedtuple(name, [field[0] for field in fields])