Skip to content

unbinding Binding #1

Description

@debug-ito

Sometimes it's useful to have Binding that unbinds some input symbols.

For example,

data Input = A | B | C

bound_A :: Binding s Input
bound_A = binds $ on A `run` putStrLn "hoge"

unbind_A :: Binding s Input
unbind_A = ... -- something that unbind input A

Then,

bound_A  <> unbind_A == mempty
unbind_A <> bound_A  == bound_A

This can be implemented by changing the value type of Binding map from Action ... to Maybe (Action ...). Because Binding and Binder are opaque, the change would be additive (i.e. no need to major version bump).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions