RE: Concurrent-Haskell in GHC

2003-02-04 Thread Simon Peyton-Jones
| I've started looking into the docs on GHC's | implementation of Concurrent-Haskell, and I got | confused about the architecture. Different sources | seem to indicate that it either: | - Uses one OS thread, and blocking IO calls will | therefore block all the Haskell-threads, or | - Uses one OS th

Re: GHC and C++ (was RE: Creating COM objects and passing out pointers to them via a COM interface)

2003-02-04 Thread Sarah Thompson
I'm replying to two threads at the same time and cross posting my reply, because they are very relevant to each other. I'm sorry if anyone here ends up seeing this more than once as a consequence. [s] -- > Sarah > > Did you get this problem sorted out? Not directly. I ended up building an 'o

RE: Concurrent-Haskell in GHC

2003-02-04 Thread Simon Marlow
> | I've started looking into the docs on GHC's > | implementation of Concurrent-Haskell, and I got > | confused about the architecture. Different sources > | seem to indicate that it either: > | - Uses one OS thread, and blocking IO calls will > | therefore block all the Haskell-threads, or > | -

arrays and lamda terms

2003-02-04 Thread Cagdas Ozgenc
Greetings.   My question is not directly related to Haskell.   Is it possible to encode an array using lamda terms only, and recover the term specified by an index term in O(1) time (in other words in one step reduction, without cheating using several steps behind the scenes)? Or is it possi

Stacking up state transformers

2003-02-04 Thread Guest, Simon
Thanks to Andrew, I'm now backtracking my state correctly. Now what I want to do is have two elements of state, an element that gets backtracked, and an element that doesn't. My monad now looks like this: type NondetState bs ns a = StateT bs (NondetT (StateT ns Maybe)) a where bs is my backtrac

Re: arrays and lamda terms

2003-02-04 Thread Claus Reinke
  Is it possible to encode an array using lamda terms only, and recover the term specified by an index term in O(1) time (in other words in one step reduction, without cheating using several steps behind the scenes)? depends a bit on your definitions, doesn't it? if you take lambda

Re: Global variables?

2003-02-04 Thread Andrew J Bromage
G'day all. On Mon, Feb 03, 2003 at 03:24:49PM -0600, Jon Cast wrote: > I, personally, haven't written a program whose bulk will fit in a single > file in several years, and I doubt I ever will again. So, support for > separate compilation is a necessity. How do you intend to handle this? Haske

Re: Stacking up state transformers

2003-02-04 Thread Iavor S. Diatchki
hello, Guest, Simon wrote: > ... > > Now what I want to do is have two elements of state, an element that gets backtracked, > and an element that doesn't. > > My monad now looks like this: > > type NondetState bs ns a = StateT bs (NondetT (StateT ns Maybe)) a > > where bs is my backtracked state

Re: arrays and lamda terms

2003-02-04 Thread oleg
Cagdas Ozgenc wrote: > Is it possible to encode an array using lamda terms only, and recover > the term specified by an index term in O(1) time? I'd like to go on a limb and argue that there is generally no such thing as O(1) array access operation. On the conventional hardware, the fastest acce

Re: Stacking up state transformers

2003-02-04 Thread Andrew J Bromage
G'day. On Tue, Feb 04, 2003 at 05:24:29PM -, Guest, Simon wrote: > I can still access my backtracked state using Control.Monad.State.{get,put}, but > I can't access my non-backtracked state. Iavor mentioned using "lift", plus some other ideas. That's what I'd do: liftNondet = lift

Re: arrays and lamda terms

2003-02-04 Thread Cagdas Ozgenc
> The formula involves the addition of two numbers -- which is, > generally, a O(log(n)) operation. Granted, if we operate in the > restricted domain of mod 2^32 integers, addition can be considered > O(1). If we stay in this domain however, the size of all our arrays is > limited to M (which is 2