Re: [Haskell-cafe] Re: Haskell-Cafe Digest, Vol 33, Issue 9

2006-05-11 Thread Albert Lai
"Alberto G. Corona " <[EMAIL PROTECTED]> writes: > stmcache= newTVar 0 I will explain what this doesn't with an analogy. import Data.IORef notglobal = newIORef True main = do a <- notglobal b <- notglobal writeIORef a False x <- readIORef b print x To b

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Jared Updike
It would also be wise to look at occam and erlang and see if they have any useful ideas. And, of course, Windows PowerShell. And scsh (Scheme shell, pretty full featured these days): http://www.scsh.net/ Jared. j. ___ Haskell-Cafe mailing list Ha

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Donn Cave
On Thu, 11 May 2006, Brian Hulley wrote: ... > -- catenate all files in a specified directory > > catenate outputFile dir = withDir dir $ > ls >>= cat outputFile So, you would apply this like catenate "result" "/etc/stuff" ? String literals need

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Jeremy Shaw
At Thu, 11 May 2006 23:05:14 +0100, Brian Hulley wrote: > Of course the above could no doubt be improved but surely it is already far > easier to understand and much more powerful than the idiosyncratic text > based approach used in UNIX shells (including rc). The idea of representing unix pip

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Brian Hulley
Brian Hulley wrote: rename extFrom extTo files = do let candidates = filter (\(_,ext) -> ext==extFrom) (map split files) mapM_ (\f@(n,_) -> rename (unsplit f) (unsplit (n, extTo))) candidates % ls >>= rename "txt" "hs" I see I've used the same name twice...;-) It sh

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Brian Hulley
Donn Cave wrote: On Wed, 10 May 2006, Donald Bruce Stewart wrote: Funny this should come up. We've just had several submissions to work on a functional shell for the google summer of code. Here's a bit of a summary of what's been done in Haskell I prepared a while back. http://www.cse.unsw.ed

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Donn Cave
On Wed, 10 May 2006, Donald Bruce Stewart wrote: > Funny this should come up. We've just had several submissions to work on > a functional shell for the google summer of code. > > Here's a bit of a summary of what's been done in Haskell I prepared a > while back. > > http://www.cse.unsw.edu.au/~

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 33, Issue 9

2006-05-11 Thread Alberto G. Corona
Hi, I´m trying to make a searchable transactional cache using STM. The whole idea is to use indexed TVar variables using a FiniteMap. another TVar holds the finitemap . This last TVar has to be a global variable. I found that when handled as global, a TVar does not keep the state. For example: s

[Haskell-cafe] RE: Template Haskell Person/Paper entry

2006-05-11 Thread Simon Peyton-Jones
Can anyone help Christoph with uploading a Postscript file to a haskellwiki page? Thanks | -Original Message- | From: Ch. A. Herrmann [mailto:[EMAIL PROTECTED] | Sent: 11 May 2006 14:29 | To: Ian Lynagh | Cc: Simon Peyton-Jones | Subject: Re: Template Haskell Person/Paper entry | | Hi, |

[Haskell-cafe] Re: Existentially-quantified constructors: Hugs is fine, GHC is not?

2006-05-11 Thread Ben Rudiak-Gould
Otakar Smrz wrote: data ... = ... | forall b . FMap (b -> a) (Mapper s b) ... where FMap qf qc = stripFMap f q the GHC compiler as well as GHCi (6.4.2 and earlier) issue an error My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors

Re: [Haskell-cafe] The values of infinite lists

2006-05-11 Thread Brian Hulley
Robert Dockins wrote: On Wednesday 10 May 2006 02:49 pm, you wrote: I could write: ] (r',_) = runIO (mapM print ones) realWorld and this computation, even though some printing would be observable, still evaluates to bottom, because r' will never be bound. Humm... how do you define observable