On Sat, 19 Sep 2015, [email protected] wrote:

>     I've written a little thing with alsa-seq that listens out for 
> Sound.ALSA.Sequencer.Event.NoteOn messages and peforms actions based on 
> the message. Something I'm stuck on, though, is I can't find where the 
> MIDI device id is.

What MIDI device ID do you mean? There is no MIDI device information in a 
Note event.

> It doesn't seem to be in the "T" value for that module.

The problem is certainly that I define the type in a private module and 
export it from a public module. Haddock does not know the public module 
that exports the identifier.

>     Another (unrelated) question is about the warning about "this whole 
> library does not appear to be particularly thread aware" -- does that 
> just mean it has weird/undefined behavior when actions happen 
> concurrently to the same Sequencer.T from separate threads?

This is what the comment in Sequencer.hs suggests to me and I think this 
behaviour is sound. I do not think that it is the responsibility of an 
(imperative) library to guard every access to a mutable data structure 
with a lock. But I think it is a problem if a library uses mutable global 
variables and then requires the programmer to use the same lock for all 
functions of the library.

-- 

Read the whole topic here: Haskell Art:
http://lurk.org/r/topic/4qxgR1RUItk019JjoDlaGC

To leave Haskell Art, email [email protected] with the following email 
subject: unsubscribe

Reply via email to