Re: STM experiment

2009-10-02 Thread Brent Yorgey
On Fri, Oct 02, 2009 at 06:16:49PM +0200, Luca Ciciriello wrote: > > Compiling this module with: > > ghc --make Main.hs -o Main > > and launcing ./Main the result is just: > > Terminal> world Also, the reason you only get "world" here is likely because the main thread prints "world" and exits befo

Re: STM experiment

2009-10-02 Thread Luca Ciciriello
Thanks Dan. I understand, your explanation is clear. I just need to study more Haskell. Im' just a beginner but very enthusiastic learning this "think-different" language (I'm a 12-year experienced C++ programmer). Thanks again. Luca. On Oct 2, 2009, at 6:28 PM, Daniel Peebles wrote: H

Re: STM experiment

2009-10-02 Thread Daniel Peebles
Hi Luca, Just in case you weren't aware of it, your example didn't actually contain any STM (beyond the import), just regular Haskell IO-based concurrency. But the answer to your question is that there's no synchronization on writing to a file descriptor, so both threads are "simultaneously" writ

STM experiment

2009-10-02 Thread Luca Ciciriello
Hi All. I'm very new using Concurrency and STM in Haskell. I'm trying some basic example using STM like this one: module Main where import IO import Control.Concurrent import Control.Concurrent.STM main :: IO () main = do forkIO (hPutStr stdout "Hello

Re: [Haskell-cafe] Ghci dynamic linking (Was: C++ libraries and GHCI)

2009-10-02 Thread Paolo Losi
Thanks for the reply, Max. If it's not something overly complex, I'll try to hack ghc to see if I can produce a working patch... probably that symbol type can be safely ignored by ghci linker. Thanks again for your help Paolo On Wed, Sep 30, 2009 at 2:29 PM, Max Bolingbroke wrote: > (Moving t

RE: Malformed class assertion with GHCi's output (a -> a ~ T a)

2009-10-02 Thread Simon Peyton-Jones
Thanks. I've fixed this. Ian: pls merge if time. Simon Fri Oct 2 12:15:49 BST 2009 simo...@microsoft.com * Fix pretty-printing precedence for equality constraints M ./compiler/types/TypeRep.lhs -1 +7 From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-boun