Re: ghc/rts/RtsUtils.c

2000-04-10 Thread George Russell
George Russell wrote: I'm sure I've had problems with Sun's systime functions before . . . ../driver/ghc-inplace -I../includes -I. -Iparallel -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return

RE: Catching black holes

2000-04-10 Thread Simon Marlow
Consider import Exception hiding ( catch ) main = tryAll (let x = x in x :: ()) = print (Using current CVS; WinNT box). My understanding was that GHC exceptions could catch blackholes. But the above program causes: bash% ../driver/ghc-inplace Blackhole.hs -syslib

RE: Problems importing PrelGHC

2000-04-10 Thread Simon Peyton-Jones
Sorry about this. I think it's now fixed | -Original Message- | From: Sven Panne [mailto:[EMAIL PROTECTED]] | Sent: 08 April 2000 18:08 | To: GHC Bugs | Subject: Problems importing PrelGHC | | | Currently importing PrelGHC does not work if -O is used, e.g. when | compiling hslibs: | |

Re: Catching black holes

2000-04-10 Thread Andy Gill
My understanding was that GHC exceptions could catch blackholes. Is this a known shortcoming, or am I missing the point? Simon Marlow wrote: This isn't currently implemented. It's not entirely straightforward, in that hitting a black hole isn't always an error, it might just indicate that

Re: tryTakeMVar :: MVar a - IO (Maybe a)

2000-04-10 Thread Marcin 'Qrczak' Kowalczyk
Sun, 9 Apr 2000 13:54:47 -0700, Sigbjorn Finne [EMAIL PROTECTED] pisze: Wouldn't be nice to have such function? Have you tried using Concurrent.isEmptyMVar ? isEmptyMVar is not enough to implement tryTakeMVar (but tryTakeMVar would suffice for isEmptyMVar). Just after checking that it is

Re: tryTakeMVar :: MVar a - IO (Maybe a)

2000-04-10 Thread George Russell
Would it be possible to implement an operation to lock an MVar without any extra expense? So that the thread owning the MVar can do things to it, but no other thread can. If it is possible, I suggest that it be added and it would solve Marcin's problem (isEmptyMVar would then suffice).

Re: Strictness info in interface files

2000-04-10 Thread Keith Wansbrough
[copied to the list as it is likely of general interest / worth putting on the Wiki?] [EMAIL PROTECTED] writes: Yes it does, thank you. Since I never looked at this stuff before, it was quite hard to decode. But I'm still puzzled about some cases: [..] It also lacks __S . Does the absence

RE: Parallel Or in Glasgow Haskell

2000-04-10 Thread Simon Peyton-Jones
| How do I write parallel or in Concurrent Haskell, without using unsafe | features? So I want a function |por :: a - a - a | which takes two (presumably unevaluated) parameters and evaluates them | concurrently and returns if either of them returns. In Concurrent Haskell, with

Type signatures in instance declarations?

2000-04-10 Thread George Russell
Why are these illegal? I appreciate that they can't give useful information to the compiler, which knows the type already from the class, but in my opinion they are still useful to the maintainer, because they serve as a reminder of the type.

Re: Type signatures in instance declarations?

2000-04-10 Thread Marc van Dongen
George Russell ([EMAIL PROTECTED]) wrote: : Why are these illegal? I appreciate that they can't give useful information : to the compiler, which knows the type already from the class, but in my : opinion they are still useful to the maintainer, because they serve as : a reminder of the type. :

Type signatures in instance declarations?

2000-04-10 Thread Peter Hancock
George Russell [EMAIL PROTECTED] writes: Why are these illegal? I appreciate that they can't give useful information to the compiler, which knows the type already from the class, but in my opinion they are still useful to the maintainer, because they serve as a reminder of

Re: Type signatures in instance declarations?

2000-04-10 Thread Koen Claessen
Some people write: | "Type signatures in instance declarations?" | Why are these illegal? I agree completely. Related questions are: * Why can one not have a type declaration of a function twice ore more in a file? It seems a bit silly, because you are allowed to put the type

Re: Type signatures in instance declarations?

2000-04-10 Thread Marc van Dongen
Koen Claessen ([EMAIL PROTECTED]) wrote: [snip] : * Why can one not have a type declarion in the export : list of a module? Common practice for many people : is to put these types in comments now (which is really : dangerous, since the types might change but not the :