I ran into this as soon as I tried to use pattern matching in a module where I'm already using case classes. Even simply pasting the first pattern matching example from the README fails identically with:
Traceback (most recent call last):
File "/Users/jrk/miniconda/lib/python2.7/site-packages/macropy/core/import_hooks.py", line 75, in find_module
exec code in mod.__dict__
File "path/to/schedule.py", line 38, in <module>
print reduce(lambda a, b: a + b, Cons(1, Cons(2, Cons(4, Nil()))))
File "path/to/schedule.py", line 32, in reduce
with switch(my_list):
NameError: global name '_matching' is not defined
Mac OS 10.11b3 with Miniconda Python 2.7.10, MacroPy 1.0.3 installed from pip this afternoon.
I ran into this as soon as I tried to use pattern matching in a module where I'm already using case classes. Even simply pasting the first pattern matching example from the README fails identically with:
Mac OS 10.11b3 with Miniconda Python 2.7.10, MacroPy 1.0.3 installed from pip this afternoon.