Skip to content

Conversation

Kritzefitz
Copy link

This PR removes the unnecessary IO from the return value of signalAddHandler. It isn't needed because the argument to the AddHandler constructor already is IO.

I took the liberty of updating the dependencies in the stack.yaml, because I needed a newer version of haskell-gi-base (>= 0.22) to access disconnectSignalHandler.

Since I changed the type of signalAddHandler this PR isn't backwards compatible. If you prefer to take a more compatible approach, like leaving the type of signalAddHandler unachanged and introducing the new type as something like signalAddHandler' or similar, just say so.

@Kritzefitz Kritzefitz force-pushed the remove-unnecessary-io branch from 1bfb830 to 5fe0db4 Compare December 17, 2019 10:03
@Kritzefitz Kritzefitz changed the title Remove unnecessary io Remove unnecessary IO Dec 17, 2019
@Kritzefitz Kritzefitz force-pushed the remove-unnecessary-io branch from 5fe0db4 to 4a2bf18 Compare September 8, 2020 08:26
@mr
Copy link
Owner

mr commented Sep 14, 2021

I like this but is there a reason you bumped the min version?

@Kritzefitz
Copy link
Author

I like this but is there a reason you bumped the min version?

disconnectSignalHandler was introduced in haskell-gi-base-0.22.0.

Since an `AddHandler` already allows doing `IO` “inside” it, the outer
`IO` is not necessary.
@Kritzefitz Kritzefitz force-pushed the remove-unnecessary-io branch from 4a2bf18 to 828eff6 Compare September 14, 2021 08:44
@Kritzefitz
Copy link
Author

Heads up: I rebased my branch onto the current master, so you might have to git reset --hard if you have a local checkout of my branch.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants