Main Thread Evacuated

2002-09-25 Thread Wolfgang Thaller
I've found a bug in the scheduler: When a main thread finishes (e.g. returning from a ffi callback), the GC might be run before it is removed from the main_threads list. If a major collection happens, the thread will be garbage collected and the GC barfs when it updates the pointers in the

Generating docs

2002-09-25 Thread Ralf Hinze
What is the approved way of generating and installing docs? I tried (from source) ./configure ... make all make install make html make dvi make ps make install-docs The latter command fails with (as usual with a bit of German :-) --- ==fptools== make install-docs -wr; in

RE: Generating docs

2002-09-25 Thread Simon Marlow
What is the approved way of generating and installing docs? I tried (from source) ./configure ... make all make install make html make dvi make ps make install-docs The latter command fails with (as usual with a bit of German :-) Do you have Haddock installed? Did the configure

RE: empty field label constructor infelicity

2002-09-25 Thread Simon Peyton-Jones
| The report says The expression F {}, where F is a data constructor, is | legal whether or not F was declared with record syntax, provided F has no | strict fields: it denotes F _|_1 ... _|_n where n is the arity of F. | | It unclear to me why there needs to be this provision for records with

Re: Generating docs

2002-09-25 Thread Ralf Hinze
What is the approved way of generating and installing docs? I tried (from source) ./configure ... make all make install make html make dvi make ps make install-docs The latter command fails with (as usual with a bit of German :-) Do you have Haddock installed? Did the

RE: Generating docs

2002-09-25 Thread Simon Marlow
BTW, why did you separate Haddock from GHC? I love these vicious circles: to build GHC with docs you need Haddock, to build Haddock you need GHC ... You can either use an installed Haddock, or use Haddock from the same tree (./configure --enable-src-tree-haddock). It's not really a cyclic

RE: Main Thread Evacuated

2002-09-25 Thread Simon Marlow
I've found a bug in the scheduler: When a main thread finishes (e.g. returning from a ffi callback), the GC might be run before it is removed from the main_threads list. If a major collection happens, the thread will be garbage collected and the GC barfs when it updates the pointers

Haskell 98

2002-09-25 Thread Simon Peyton-Jones
| The report says The expression F {}, where F is a data constructor, is | legal whether or not F was declared with record syntax, provided F has no | strict fields: it denotes F _|_1 ... _|_n where n is the arity of F. | | It unclear to me why there needs to be this provision for records with

Re: Haskell 98

2002-09-25 Thread Ross Paterson
On Wed, Sep 25, 2002 at 12:34:53PM +0100, Simon Peyton-Jones wrote: I spoke too soon. Consider data F = F Int !Int data S = S { x::Int, y::!Int } According to the words above F {} is illegal but what about this one? S {} I think the sentence in question (end of 3.15.2)

RE: Haskell 98

2002-09-25 Thread Simon Peyton-Jones
| I think the sentence in question (end of 3.15.2) is just a clarification; | the preceding 4 rules are sufficient and clear: F{}, S{} and S{x=3} are | all illegal because they omit a value for a strict field. That is, it's | correct, though not strictly necessary, nor does it cover all the

RE: Haskell 98

2002-09-25 Thread Hal Daume III
Blargh. Excellent point. I had totally forgotten that. I withdraw all suggested changes except a cross-ref to the section you mention. Sigh. My brain is getting soft. Actually the rules referenced appear immediately above, so no reference is necessary. My original message was not

dead link

2002-09-25 Thread Christian Maeder
On http://www.haskell.org/ghc/ the link to the Users' Guide is missing. Cheers Christian GHC Features This is a summary of GHC's main features. They are all described in more detail in the Users' Guide. The requested URL /ghc/docs/latest/html/users_guide/book-users-guide.html was not found

RE: uh oh, another bug report :) (it and big computations)

2002-09-25 Thread Simon Marlow
*Foo it ghc-5.04.1: panic! (the `impossible' happened, GHC version 5.04.1): rdrNameModule it Fixed, thanks. Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

RE: Newbie building GHC

2002-09-25 Thread Simon Marlow
The reason that this worries me is that Cygwin ld links with libraries from the Cygwin lib directory rather than the Mingw equivalent, regardless of which gcc was used to compile the object files. We only use ld directly when building the GHCi libraries (HSbase.o etc.), and this doesn't

RE: specifying the name of the executable under Windows

2002-09-25 Thread Simon Peyton-Jones
foo.exe, not foo. I'll mention this in the user manual S | -Original Message- | From: Wolfgang Jeltsch [mailto:[EMAIL PROTECTED]] | Sent: 24 September 2002 22:30 | To: The Glasgow Haskell Users Mailing List | Subject: specifying the name of the executable under Windows | | Hi, | | if

Behaviour of div mod with negative arguments?

2002-09-25 Thread Dr Mark H Phillips
Hi, Does Haskell specify how div and mod should behave when given one or both arguments negative? Eg, in hugs we get: div 13 = 0 div (-1) 3 = -1 div 1 (-3) = -1 div (-1) (-3) = 0 and so on. I've had a bit of a look for where div and mod are specified exactly, but I can only find

RE: Behaviour of div mod with negative arguments?

2002-09-25 Thread Simon Marlow
Does Haskell specify how div and mod should behave when given one or both arguments negative? Eg, in hugs we get: div 13 = 0 div (-1) 3 = -1 div 1 (-3) = -1 div (-1) (-3) = 0 and so on. We usually describe div as the version of division that truncates towards negative

RE: report definition of field names

2002-09-25 Thread Simon Peyton-Jones
| Replace: | A datatype declaration may optionally include field labels for some | or all of the components of the type. | With: | A datatype declaration may optionally include field labels. Each | constructor must use either labelled fields or unlabelled fields, | but

Re: Behaviour of div mod with negative arguments?

2002-09-25 Thread Lennart Augustsson
Dr Mark H Phillips wrote: Hi, Does Haskell specify how div and mod should behave when given one or both arguments negative? Yes, section 6.4.2 gives an exact definition. P.S. I notice in hugs if I type -1 `div` 3 the `div` binds to the 1 and 3 first, and only applies the - at the end. Is

RE: empty field label constructor infelicity

2002-09-25 Thread Simon Peyton-Jones
| The report says The expression F {}, where F is a data constructor, is | legal whether or not F was declared with record syntax, provided F has no | strict fields: it denotes F _|_1 ... _|_n where n is the arity of F. | | It unclear to me why there needs to be this provision for records with

Haskell 98

2002-09-25 Thread Simon Peyton-Jones
| The report says The expression F {}, where F is a data constructor, is | legal whether or not F was declared with record syntax, provided F has no | strict fields: it denotes F _|_1 ... _|_n where n is the arity of F. | | It unclear to me why there needs to be this provision for records with

Re: Haskell 98

2002-09-25 Thread Ross Paterson
On Wed, Sep 25, 2002 at 12:34:53PM +0100, Simon Peyton-Jones wrote: I spoke too soon. Consider data F = F Int !Int data S = S { x::Int, y::!Int } According to the words above F {} is illegal but what about this one? S {} I think the sentence in question (end of 3.15.2)

RE: Haskell 98

2002-09-25 Thread Simon Peyton-Jones
| I think the sentence in question (end of 3.15.2) is just a clarification; | the preceding 4 rules are sufficient and clear: F{}, S{} and S{x=3} are | all illegal because they omit a value for a strict field. That is, it's | correct, though not strictly necessary, nor does it cover all the

new to haskell-not working for some reason

2002-09-25 Thread G?????? ??sµ?d??
I am new to haskell. I am trying to do some excersise but i can't make anything work :( This is my code.I replaced spaces with underscores ( _ ) Thanks for any suggestions or correctrions import IO import System import List import Maybe import Char import Numeric type Name=String type Room=Int

Re: new to haskell-not working for some reason

2002-09-25 Thread Hal Daume III
Among other things, please make sure your layout lines up. Also, you cannot have the definition of getText at the same indentation of userText-getText otherwise your compiler will think this is part of the do statement (I believe): main=do userText-getText

Kanser tedavisi

2002-09-25 Thread carctol
charset=US-ASCII; charset=US-ASCII; charset=US-ASCII; charset=US-ASCII Reply-To: [EMAIL PROTECTED] Date: Thu, 26 Sep 2002 00:12:08 +0300 X-Priority: 3 X-Library: Indy 9.00.10 X-Mailer: Foxmail Kemoterapinin yan etkileri nedeniyle yorgun ve bitkin düsmüs bir yakininiz mi

Dealing with configuration data

2002-09-25 Thread Liyang Hu
Evening, I'm trying to write a utility that reads in some user preferences from a pre-determined file, does some work, and exits. Sounds simple enough. The problem I'm having is with the preferences: How do I make it available throughout the entire program? (FWIW, most of the work is

Re: Dealing with configuration data

2002-09-25 Thread Hal Daume III
AFAIK, the global variable (so-called), passing around, and lifting the IO monad are your only options. I almost always use the global variable method since I know that in this case the unsafePerformIO is actually safe, since writing to the variable will always occur before the call to upIO and

Re: Dealing with configuration data

2002-09-25 Thread Hal Daume III
Sorry, I should also mention implicit parameters, if you're willing to use that extension. I don't like them, though, and my impression from SPJ is that it's very unclear whether they will get into Haskell 2 or not... -- Hal Daume III Computer science is no more about computers| [EMAIL

Re: Dealing with configuration data

2002-09-25 Thread Nick Name
On Wed, 25 Sep 2002 16:06:29 -0700 (PDT) Hal Daume III [EMAIL PROTECTED] wrote: I don't feel bad about doing this because GHC does this itself for its own configuration :). I am going to show you that using unsafePerformIO where there really are side effects leads to unpredictable results,

Re: Dealing with configuration data

2002-09-25 Thread Jorge Adriano
Evening, I'm trying to write a utility that reads in some user preferences from a pre-determined file, does some work, and exits. Sounds simple enough. The problem I'm having is with the preferences: How do I make it available throughout the entire program? (FWIW, most of the work is

Re: Dealing with configuration data

2002-09-25 Thread Hal Daume III
I don't mean to troll, but this isn't what I meant. Suppose we have: data Configuration = ... -- config data globalConfig :: IORef Configuration globalConfig = unsafePerformIO (newIORef undefined) Now, we define an unsafe function to read the configuration: getConfig ::

Low Price Fags

2002-09-25 Thread Sales Department
Dear Sir or Madam In the past you have requested information on discounted products. We hope that you find this of interest. If you are not a smoker, and find this email offensive, we sincerely apologise! We will be only too happy to take you off our mailing list. If you are a smoker,

Re: Dealing with configuration data

2002-09-25 Thread Andrew J Bromage
G'day all. On Thu, Sep 26, 2002 at 12:06:36AM +0100, Liyang Hu wrote: The problem I'm having is with the preferences: How do I make it available throughout the entire program? (FWIW, most of the work is effectively done inside the IO monad.) I could explicitly pass the record around