Re: memory ordering

2013-12-30 Thread Edward Z . Yang
Hello John, Here are some prior discussions (which I will attempt to summarize below): http://www.haskell.org/pipermail/haskell-cafe/2011-May/091878.html http://www.haskell.org/pipermail/haskell-prime/2006-April/001237.html http://www.haskell.org/pipermail/haskell-prime/2006-March/001

RE: Decomposition of given equalities

2013-12-30 Thread Simon Peyton-Jones
| given `(f a ~ g b)` there's no possible way that `a` and `b`, resp. `f` | and `g` might have different kinds (how could you ever have constructed | `f a ~ g b` if they did?) Wait. It's quite possible for them to have different kinds. E.g. f :: (* -> *) -> * a :: (* -> *) g :: * -> * b :: *

Re: Decomposition of given equalities

2013-12-30 Thread Gábor Lehel
On Mon, Dec 30, 2013 at 7:00 PM, Simon Peyton-Jones wrote: > | given `(f a ~ g b)` there's no possible way that `a` and `b`, resp. `f` > | and `g` might have different kinds (how could you ever have constructed > | `f a ~ g b` if they did?) > > Wait. It's quite possible for them to have different

Re: memory ordering

2013-12-30 Thread John Lato
Hi Edward, Thanks very much for this reply, it answers a lot of questions I'd had. I'd hoped that ordering would be preserved through C--, but c'est la vie. Optimizing compilers are ever the bane of concurrent algorithms! stg/SMP.h does define a loadLoadBarrier, which is exposed in Ryan Newton'