diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-21 18:36:08 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-02 03:41:37 -0500 |
commit | beed7c3e7c0703089a9ba4321bd3a2e442213fad (patch) | |
tree | b8bc1a9e0f4b2926fd29becf4985eb9cff556e3c /testsuite/driver | |
parent | 2b113fc957a3fb6eafd10ad41a7caf11009ef4eb (diff) | |
download | haskell-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.py | 23 |
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]) |