Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finer hook types... #215

Open
mgajda opened this issue Oct 12, 2022 · 1 comment
Open

Finer hook types... #215

mgajda opened this issue Oct 12, 2022 · 1 comment
Labels
beginner-friendly Good for newcomers enhancement New feature or request help wanted Extra attention is needed

Comments

@mgajda
Copy link

mgajda commented Oct 12, 2022

It would be nice to see examples of hook types that are finer, and more declarative.

Instead of ... -> IO (), I would love to see:

  • type HookNewTerminal = Terminal -> IO Terminal,
  • type HookNewWindow = ApplicationWindow -> Terminal -> IO Terminal,
  • type HookNameChange = Terminal -> String -> IO Terminal
  • type HookWindowResize = ...

However all these require a smart constructor to convert into conventional hook.

@cdepillabout
Copy link
Owner

Thanks for opening this issue! I agree that more hooks are needed.

The only reason I haven't added many is because I wasn't sure exactly what end users would need.

If you have some hooks you'd like, please feel free to send a PR adding them and I will merge in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-friendly Good for newcomers enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants