Skip to content

perform masks errors #63

Open
Open
@rbtcollins

Description

@rbtcollins

This is perhaps a usage bug rather than a bug in effect, but:

class Print:
    def __init__(self, line):
        self.line = line


@sync_performer
def real_print(dispatcher, print_):
    print(print_.line)
    import pdb;pdb.Pdb(stdout=sys.stderr).set_trace()
    sys.stdout.flush()


real_interpreter = ComposedDispatcher([
    TypeDispatcher({Print: real_print}),
    base_dispatcher])


def program():
    return Effect(Print('What... is your quest?'))


if __name__ == '__main__':
    perform(real_interpreter, program())
$ python 05.py > /dev/full
$ echo $?
0

It seems reasonable to me that in the absence of a error catcher anywhere that it should ultimately propogate up to perform and beyond.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions