strange difference between old and hierachical module names

2003-11-03 Thread Ralf Laemmel
Hi, I am trying to compile some modules with old imports such import MonadFix. These modules compile fine with GHC 6.0 latest RPM, and also on CVS source tree 6.1 somewhere from july. However, the file below does NOT get through with GHC HEAD. I get ... Compiling Foo ( Foo.hs,

[ ghc-Bugs-832920 ] Missing # from #-} elicits utterly opaque error

2003-11-03 Thread SourceForge.net
Bugs item #832920, was opened at 2003-10-30 09:17 Message generated for change (Comment added) made by simonmar You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=832920group_id=8032 Category: None Group: None Status: Closed Resolution: Wont Fix Priority: 5

RE: strange difference between old and hierachical module names

2003-11-03 Thread Simon Peyton-Jones
Good bug report. Now fixed in the HEAD Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-bugs- | [EMAIL PROTECTED] On Behalf Of Ralf Laemmel | Sent: 03 November 2003 11:10 | To: [EMAIL PROTECTED] | Subject: strange difference between old and hierachical

Bug in 6.0.1

2003-11-03 Thread Matthew Parry
When I load HToolkit 1.2 into GHC 6.0.1 I get the following: --8 mettw ghci -package gio ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.0.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_|

Slight doc typos

2003-11-03 Thread Juanma Barranquero
Section 7.4 of the User Guide (or doc source ghc/docs/user_guide/glasgow_exts.sgml) references Haskell 1.4 several times when Haskell 98 would perhaps be more appropriate. Also, section 7.4.10 (Arbitrary-rank polymorphism, same sgml source) has an example with functions f1, g1, f2, g2 and f3, but

RE: Slight doc typos

2003-11-03 Thread Simon Marlow
Section 7.4 of the User Guide (or doc source ghc/docs/user_guide/glasgow_exts.sgml) references Haskell 1.4 several times when Haskell 98 would perhaps be more appropriate. Also, section 7.4.10 (Arbitrary-rank polymorphism, same sgml source) has an example with functions f1, g1, f2, g2

RE: strange difference between old and hierachical module names

2003-11-03 Thread Ralf.Laemmel
SPJ wrote: Good bug report. Now fixed in the HEAD Thanks, but there is now a more serious problem; could be a consequence of the fix. See below a little test file Main.hs and the ghci session for this file using HEAD updated just after your fix. Thanks, Ralf [EMAIL PROTECTED] test]$ more

Building GHC on Mac OS X or Fixing readline

2003-11-03 Thread Kennis Koldewyn
I've attempted to compile GHC 6.01 from sources for Mac OS X, but after a successful configure, make soon grinds to a halt (see Listing 1 below). I'm looking for either: 1. A brief list of tips and tricks for getting GHC to build on Mac OS X (see My Mac below), or 2. A way to fix my

RE: UArray question....

2003-11-03 Thread Simon Marlow
In GHC/FFI, is there some way (is it possible ?) to access DIRECTLY an array of UArray type (immutable) in a sequential contiguous memory buffer (in C side, for example) without to need to copy the array elements one by one ? GHC hackers and implementors are wellcome... :-) My

RE: DiffArray Performance

2003-11-03 Thread Simon Marlow
Hello again, Another thought.. Could it be that sTree0 is cyclic that accounts for this dramatic slow down? I'm not to sure how DiffArray are implemented, but if it's how I would do it it seems you would end up with a massive chain of indirections. Possible. It is possible to get an

RE: Question about profiling in GHC...

2003-11-03 Thread Simon Marlow
Yes, it's probably garbage collection. To be sure, you can run your program with the -t RTS option, which will create a file in the current working directory named foo.stat if the executable is named foo. The resulting file will contain the total amount of time spent, the mutator

RE: GHC changes

2003-11-03 Thread Simon Marlow
I have made some changes to the GHC source code (6.0.1) and I would really welcome your feedback, whether they are ok for my task (first step: introduce record expressions of the shape 'struct {x1=e1,x2=e2,...,xn=en}'): * added (struct, ITstruct, bit glaExtsBit), to

RE: mips64 and gmp observation

2003-11-03 Thread Simon Marlow
The same is true on IA64, if you look at the configure script there's a little hack of mine... if test $HaveLibGmp = NO; then if test $HostArch_CPP = ia64; then AC_MSG_ERROR([You need to install libgmp (the in-tree version does not work on IA64).]) fi; fi; It's probably broken for

Re: DiffArray Performance

2003-11-03 Thread Alastair Reid
I haven't checked the DiffArray implementation, though (it would be nice if someone could investigate DiffArray and fix any perf problems they find). The most obvious one is that all accesses are protected by an MVar. Of course, this is necessary in some code but I'm guessing that it's

Re: Expiring cached data?

2003-11-03 Thread Ben Escoto
On Sun, 2 Nov 2003 22:58:41 -0300 (CLST) andrew cooke [EMAIL PROTECTED] wrote: I have a Haskell program that caches data in a tree. Unfortunately, the tree grows to exceed the available memory over time. In a different language, where I might be handling the caching myself, rather than

Re: time since the epoch

2003-11-03 Thread ketil+haskell
Stefan Karrmann [EMAIL PROTECTED] writes: a while ago time calculation was subject on this list. Now, I have a time library based on the TAI (international atomic time) time scale. This is cool! But what actually happens when people post interesting library code to the list? Does somebody

RE: Expiring cached data?

2003-11-03 Thread Conal Elliott
Hi Andrew. This situation is what weak pointers [1] are for. You keep weak rather than regular pointers to your cache data. The garbage collector clears out the weak pointers and reclaims cache data when necessary. However, I don't think there is any policy to make discriminating choices about

RE: Expiring cached data?

2003-11-03 Thread Tom Pledger
Conal Elliott writes: | Hi Andrew. This situation is what weak pointers [1] are for. You keep | weak rather than regular pointers to your cache data. The garbage | collector clears out the weak pointers and reclaims cache data when | necessary. However, I don't think there is any policy to

RE: Expiring cached data?

2003-11-03 Thread Conal Elliott
Cool idea! Still, this discussion suggests to me the idea of relatively weak pointers. Instead of a pointer being either strong or weak, what if it could have a strength attribute (estimated value to the app), e.g., in the real interval of zero to one? The garbage collector would prefer

Re: Help ? :)

2003-11-03 Thread Hal Daume III
Hi, You're pretty close, actually. In general, remember the following: 'type' introduces a type synonym, which means that you're just renaming an existing type, not creating a new one. this means that you don't need constructors. 'data' means that you're defining a new type; in order to do

Re: Help ? :)

2003-11-03 Thread Graham Klyne
At 12:19 03/11/03 +, Patty Fong wrote: prolog ::= (assertion .)*?xml:namespace prefix = o ns = urn:schemas-microsoft-com:office:office / [...] type Prolog = Assertion Did you mean this to be a *list* of Assertions? e.g. type Prolog = [Assertion] Otherwise, I think Hal's response covers

Doubt regarding Types

2003-11-03 Thread Karthik Kumar
Hi All, I was trying to write go program in haskell - My code fragment looks like this - getBoardSize :: IO Bool -- TODO : What could be the type of getBoardSize getBoardSize = do c - getLine validateBoardSize ( atoi c ) -- Convert a string to an integer. --

Re: Doubt regarding Types

2003-11-03 Thread Hal Daume III
Hi, On Mon, 3 Nov 2003, Karthik Kumar wrote: -- Convert a string to an integer. -- This works perfectly fine. atoi :: [Char] - Int atoi (h : []) = if isDigit h then digitToInt h else 0 atoi (h : t) = if isDigit h then digitToInt h * ( 10 ^ length t) + atoi t else 0 you can use

Re: Doubt regarding Types

2003-11-03 Thread Karthik Kumar
Thanks a ton Hal for the quick clarification. It worked . Cheers Karthik. --- Hal Daume III [EMAIL PROTECTED] wrote: Hi, On Mon, 3 Nov 2003, Karthik Kumar wrote: -- Convert a string to an integer. -- This works perfectly fine. atoi :: [Char] - Int atoi (h : []) = if

Re: Doubt regarding Types

2003-11-03 Thread Artie Gold
Hal Daume III wrote: Hi, On Mon, 3 Nov 2003, Karthik Kumar wrote: -- Convert a string to an integer. -- This works perfectly fine. atoi :: [Char] - Int atoi (h : []) = if isDigit h then digitToInt h else 0 atoi (h : t) = if isDigit h then digitToInt h * ( 10 ^ length t) + atoi t else

Re: Doubt regarding Types

2003-11-03 Thread Karthik Kumar
Hi Artie, You are right . I had changed the code as follows - run = do c - getBoardSize validateBoardSize c -- Get the board size as input getBoardSize :: IO ( Int ) validateBoardSize :: Int - IO () ... and follows. run function is the entry point.

Re: Type tree traversals [Re: Modeling multiple inheritance]

2003-11-03 Thread Brandon Michael Moore
Thanks for the clever code Oleg. I've tried to extend it again to track the types of methods as well as just the names, giving a functional dependancy from the class, method, and to result type. I can't get the overlapping instances to work out, so I'm handing it back to a master, and the rest of