The problem was whether DiffArrays should be thread-safe in the
Concurrent Haskell sense, which means protecting access to
the DiffArray
with an MVar.
Can you give some estimate of the cost of using an MVar in this way?
It depends a lot on whether the cost of using the MVar is
I've done some hacking on Haddock to address some of these issues. Please take a look
at
http://www.haskell.org/~simonmar/haddock-test/libraries/
which is the library documentation as it will look in the next GHC release. Note that
there is a single contents page listing all
the modules
This is one good reason they have to be protected by MVars
Forgive my stupidity, but arn't the MVar operations (takeMVar, putMVar)
IO operation, therefore the locks must be in the IO monad, therefore
the code acting on the DiffArray should be in the IO monad... otherwise
they can't use the MVar
I thought about this issue a little more, and I think I see clearer now.
Usually, you can reference a function in two ways:
* apply f to an argument: f x
* pass f as a first-class object: f
A function taking an implicit parameter (let's call them IP functions
for brevity) is
On Wed, Nov 05, 2003 at 09:13:12PM +0100, Stefan Reich wrote:
Hi,
I discovered implicit parameters today and I'm very excited about them
because they allow to express certain code constructs more elegantly.
However, I stumbled upon a problem. Suppose I have these definitions
(the
On Thu, Nov 06, 2003 at 10:02:26PM +0100, Tomasz Zielonka wrote:
GHC complains with:
Unbound implicit parameter (?req :: Request)
arising from use of `controller1'
In the list element: controller1
In the definition of `controllerList':
controllerList =