from station import Clock, advance, read_label, read_tick, reset


def main() -> None:
    c = Clock(ticks=3, label="before")
    # The field and the callee's formal types are both declared in another module.
    before = c.ticks
    label = c.label
    reset(c)
    print(read_tick(before), c.ticks, read_label(label), c.label)

    earlier = c.ticks
    c.ticks = 29
    print(read_tick(earlier), c.ticks)

    # Mutating an aliased dataclass in an imported call still changes the original.
    view = c
    advance(view)
    print(c.ticks, view.ticks)


if __name__ == "__main__":
    main()
