Bug in GHCi

2002-01-25 Thread Koen Claessen
Hi, This is a bug which has been in GHCi from the beginning. Bug === GHCi interprets a module while the compiled version is present and up-to-date. Details === When I (for example) have the following module structure: module A where ... module B where import A ... The

The Handle returned by connectTo and accept is unbuffered by default.; oh yeah?

2002-01-25 Thread George Russell
According to the GHC libraries manual, 6.2.1: The Handle returned by connectTo and accept is unbuffered by default. However, with such a handle and hPutStrLn, I am getting buffering, even when use IO.hSetBuffering to NoBuffering. When I put in an explicit hFlush after the hPutStrLn it

GHC 5.02.2 installation/compilation problems

2002-01-25 Thread Nicholas Nethercote
Hi, I just installed GHC 5.02.2 (actually, the latest version from CVS), and had a strange problem. My first attempt worked ok, but I screwed something up, so I junked it and started again from scratch. This time, it died part-way through the make boot step for ghc itself, because

RE: GHC 5.02.2 installation/compilation problems

2002-01-25 Thread Simon Marlow
Hi Nick, I just installed GHC 5.02.2 (actually, the latest version from CVS), and had a strange problem. My first attempt worked ok, but I screwed something up, so I junked it and started again from scratch. This time, it died part-way through the make boot step for ghc itself,

RE: [Please mail every answer also to wolfgang@jeltsch.net.] No hierarchical module names with GHC 5?

2002-01-25 Thread Simon Marlow
I use GHC 5.00.2 on Solaris 2.6 at the university and am unable to use hierarchical module names --- with and without the -fglasgow-exts switch. GHCi notifies me of parse errors on the module name. What is interesting is that if my module with hierarchical name imports a module which

RE: GHC 5.02.2 installation/compilation problems

2002-01-25 Thread Nicholas Nethercote
On Fri, 25 Jan 2002, Simon Marlow wrote: Nothing springs to mind, unless you had explicitly set $(ProjectsToBuild) in your build.mk, and left out glafp-utils. It usually isn't necessary to set $(ProjectsToBuild) as it defaults to building all the projects in the current tree. Aha, that

RE: GHC 5.02.2 installation/compilation problems

2002-01-25 Thread Simon Marlow
Also, when I try to compile for ticky-ticky profiling... Just set GhcLibWays=t, you don't have to set GhcCompilerWays too (this is for building the compiler itself in a different way). Unless I want to ticky-ticky profile the compiler itself, yes? Yup... if you want to do that,

Ticky-ticky profiling (was: GHC 5.02.2 installation/compilationproblems)

2002-01-25 Thread Nicholas Nethercote
On Fri, 25 Jan 2002, Nicholas Nethercote wrote: Also, when I try to compile for ticky-ticky profiling... Further in the ticky-ticky adventure... Having compiled the libraries and RTS and other bits for ticky-ticky, when I try the -ticky option with ghc I get loads of messages like this at

RE: Multiply Recursive Modules

2002-01-25 Thread Simon Peyton-Jones
We discussed this and yes it seems like a fine idea. Thanks. We should have thought of it ages ago. Not sure how fast we'll implement it, but it's on the list. Simon | -Original Message- | From: George Russell [mailto:[EMAIL PROTECTED]] | Sent: 14 January 2002 16:28 | To: [EMAIL

newAddrArray# and other things

2002-01-25 Thread Hal Daume III
Okay, one quick question: what do i have to import to get newAddrArray#, readAddrArray#, etc.? And, secondly, a correction to the documentation: under the Allocation section (7.2.14.1), It says: newCharArray# :: Int# - State# s - (# State# s, MutableByteArray# s elt #) newIntArray#

ANNOUNCE: popenhs-1.00.0 released

2002-01-25 Thread Jens Petersen
Version 1.00.0 of popenhs is out. You can get it from: http://www.01.246.ne.jp/~juhp/haskell/popenhs/ popenhs is a small library providing lazy string output from and input to a subprocess. The interface provided by popen now differs from the popen3 offered in 0.00 by taking an input

Re: Explicit Universal Quantification Bug?

2002-01-25 Thread Janis Voigtlaender
Rijk-Jan van Haaften wrote: ... In the last one, after the type checker has verified that deTIM is type-correct, it can safely generalize the type of deTIM, because it is a top-level function. ... However, in runTIM t = case t of {TIM l - runST l} the argument 't' is non-generic. t is

RE: Explicit Universal Quantification Bug?

2002-01-25 Thread Simon Peyton-Jones
| I'm trying to learn more about Explicit Universal | Quantification so I decide to run the following supposedly | correct code from the ghc user | guide: | | module Dummy where | | import ST | | newtype TIM s a = TIM (ST s (Maybe a)) | | runTIM :: (forall s. TIM s a) - Maybe a | runTIM t =

RE: Explicit Universal Quantification Bug?

2002-01-25 Thread John Hughes
| I'm trying to learn more about Explicit Universal | Quantification so I decide to run the following supposedly | correct code from the ghc user | guide: | | module Dummy where | | import ST | | newtype TIM s a = TIM (ST s (Maybe a)) | |

Re: ideas for compiler project

2002-01-25 Thread Jerzy Karczmarczuk
Simon Peyton-Jones: Lots of people have observed that Haskell might be a good scripting language for numerical computation. In complicated numerical applications, the program may spend most of its time in (say) matrix multiply, which constitutes a tiny fraction of the code for the

Re: (no subject)

2002-01-25 Thread John Hughes
Those two constructs are not the same Compare newtype T1 = C1 Bool dataT2 = C2 !Bool As for as I can tell, the only difference in the Report between a newtype and a tuple type with a completely strict constructor is in the

Re: newtype pattern matching

2002-01-25 Thread Marcin 'Qrczak' Kowalczyk
25 Jan 2002 08:00:24 +0100, Martin Norbäck [EMAIL PROTECTED] pisze: newtype T1 = C1 Bool dataT2 = C2 !Bool the difference is that the constructor C1 does not exist, so only the following values exist for T1: C1 True (which is the represented as True) C1 False (which is the

type specs not making it in to functions

2002-01-25 Thread Hal Daume III
consider the following definition: class C a where foo :: a - Int instance C Bool where foo _ = 5 I can then say: bar :: C a = a - Int bar (x :: a) = foo (undefined :: a) But not: bar :: C a = a - Int bar x = foo (undefined :: a) because it tries to use a new scope for the type

Re: newtype pattern matching

2002-01-25 Thread David Feuer
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] said: The side effect of using data with a strict argument instead of newtype is that f' (C2 x) (C2 y) = C2 (f x y) unexpectedly becomes strict in both arguments, and we would have to write f' x y = C2 (f (case x of C2 x' - x')

Re: type specs not making it in to functions

2002-01-25 Thread Ashley Yakeley
At 2002-01-25 14:00, Hal Daume III wrote: class D a where constMember :: Int instance D Int where constMember = 8 It seems ehre that there's no way to extract constMember for a /particular/ class, since you can't tell it what a is supposed to be. So, instead, I do: class D a where

Announce: School of Expression software

2002-01-25 Thread Sigbjorn Finne
A Windows installer packaging up the supporting software to Paul Hudak's School of Expression book in one convenient bundle is now available via the Hugs98 downloads page (see http://haskell.org/hugs ). A tar-bundle is provided for other platforms also. It includes the source code + supporting

Re: newtype pattern matching

2002-01-25 Thread Jan-Willem Maessen
I think one crucial point is being lost in the ongoing discussion of pattern-matching and newtype: newtype is supposed permit *erasure* of construction and pattern matching. There is *no runtime cost* because the type disappears at compile time. Even a non-optimising Haskell

Re: Monad composition

2002-01-25 Thread John Hughes
Andre W B Furtado wrote: Well, it's also possible to interchange data between these two monads by: unsafeIOToST :: IO a - ST s a stToIO :: ST s a - IO a Can anyone tell the possible problems related to unsafeIOToST? ^^

Re: monad thinking process

2002-01-25 Thread Ronald Legere
Cagdas, Is it possible for you to give an example where you think there is too much thinking involved? I dont see it. Writing haskell IO with monads (with the Do notation) is just a straightforward as writing C code for the same steps, isnt it? Just try not to think about it too

Re: monad thinking process

2002-01-25 Thread Andre W B Furtado
Just check this monad tutorial (attached). It's really great for beginners. -- Andre ---BeginMessage--- -- Forwarded message -- Date: Tue, 05 Jun 2001 11:26:12 -0300 From: Andre Santos [EMAIL PROTECTED] Newsgroups: depto.cursos.grad.if098 Subject: Monads for the Working