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

export QueueLike #8

Merged
merged 1 commit into from
Feb 1, 2016
Merged

export QueueLike #8

merged 1 commit into from
Feb 1, 2016

Conversation

srijs
Copy link
Collaborator

@srijs srijs commented Feb 1, 2016

QueueLike is currently not exported. That means that it doesn't show up in the documentation, and it is not possible to actually read from the event queue.

@adinapoli
Copy link
Owner

Hey @srijs , thanks, good catch!

It's not exactly right to say that it's not possibly to read from the event stream; in fact it will work if you know a priori the inner implementation and use the concrete typeclass implementation. This in an except of code I have in production which indeed compiles:

--------------------------------------------------------------------------------
logSupervisionEvents :: Config -> TQueue SupervisionEvent -> IO ()
logSupervisionEvents cfg q = do
  evt <- atomically $ readTQueue q
  case evt of
      [...] -- redacted

And this also explains why I didn't realise sooner of the problem; I introduced the QueueLike abstraction in 1.0.4.0 and my production code didn't break during the version bump from 1.0.3.0. An eventful coincidence!

I will let Travis finish the build and then merge. Thanks!

adinapoli added a commit that referenced this pull request Feb 1, 2016
@adinapoli adinapoli merged commit ca593f3 into adinapoli:master Feb 1, 2016
@srijs
Copy link
Collaborator Author

srijs commented Feb 1, 2016

Thanks for merging so quickly! Yes, you're right, I can use it if I know what QueueLike can be (i.e. read the source) and monomorphize it, but for me it partly defeats the purpose of having it be polymorphic in the first place ;)

Can I expect a patch version on Hackage soon?

@srijs srijs deleted the patch-1 branch February 1, 2016 07:47
@adinapoli
Copy link
Owner

@srijs I will do my best to upload this on Hackage later today or tomorrow!

I will expand the changelog with your fix and release 1.0.4.1 😉

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