[Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX

Tomasz Zielonka tomasz.zielonka at gmail.com
Mon Dec 12 02:48:39 EST 2005


On Sun, Dec 11, 2005 at 10:37:12PM +0000, Joel Reymont wrote:
> Oh, right. It does not apply in my case, though, so I thought it was  
> safe.
> 
> I'm not sure what the proper Haskell wording is to explain but it  
> seems like the type system catches if a user of the library tries to  
> use two different a's (Child a) and complains. Exactly what I need as  
> access to children is hidden within my code.

If you always use "children" with the same type, then make it the type
of "children". On the other hand, if you use "children" in a scoped,
local manner, then it's better to move the variable to these local
scopes, getting rid of unsafePerformIO.

What you did here is a major Haskell sin. I am not going to invest my
time searching for bugs in your code until you fix this one ;-)

As a fast and dirty solution, I propose using MVar [Dynamic].

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list