Open Cj-bc opened 5 years ago
diff :: Session -> Session -> Session
diff prev new | prev == new = Session.empty()
| _ = Session [ diffPane p n | p <- prev.panes , n <- new.panes ]
diffPane :: Pane -> Pane -> Pane
diffPane prev new | prev == new = Pane.empty()
| _ = Pane map diffEntry prev.entries new.entries
Session.empty
Pane.empty
Entry.empty
Session.__init__
to create Session from [Pane]
Pane.__init__
to create Pane from [Entry]
THIS LOGIC MIGHT NOT WORK WHEN PANE IS MOVED I can set blocks for new Pane, but can’t remove previous blocks . I should think about this problem
I add Diff
class which holds plus/minus diffs
This project was based on OOP, but it's not completely accomplished. It's better to use only one paradigm, and OOP suits to this rather than Functional programming or others.
remove those funcs
remove_pane
write_pane
reload_pane
and add
render
which treats all rendering.render
should make diffs of states, and update blocks which was changed.