Re: Building HEAD with -fasm: error in package 'unix'

2006-12-21 Thread Clemens Fruhwirth
At Wed, 6 Dec 2006 09:40:47 +0200, wld [EMAIL PROTECTED] wrote: ghc-6.7: /home/wld/test/fptools/libraries/unix/HSunix.o: unknown symbol `lstat' For a quick fix add -fvia-c to GhcLibHcOpts = -O -fvia-c in mk/build.mk, run make clean; make in libraries/unix. After a quick glance, I can't see

[GHC] #1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub'

2006-12-21 Thread GHC
#1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub' ---+ Reporter: gracjan-agh.edu.pl | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub'

2006-12-21 Thread GHC
#1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub' +--- Reporter: gracjan-agh.edu.pl | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #455: mkProtoBCO: stack use won't fit in 16 bits 79141

2006-12-21 Thread GHC
#455: mkProtoBCO: stack use won't fit in 16 bits 79141 --+- Reporter: simonmar | Owner: igloo Type: bug | Status: closed Priority: normal| Milestone: 6.6.1 Component: GHCi

Re: [GHC] #953: panic in ghci for lseek ffi import statement

2006-12-21 Thread GHC
#953: panic in ghci for lseek ffi import statement --+- Reporter: [EMAIL PROTECTED] | Owner: igloo Type: bug | Status: new Priority: normal| Milestone: 6.6.1

Re: [GHC] #1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub'

2006-12-21 Thread GHC
#1066: MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub' +--- Reporter: gracjan-agh.edu.pl | Owner: thorkilnaur Type: bug | Status: new Priority: normal

[GHC] #1067: assertion failure in Schedule.c

2006-12-21 Thread GHC
#1067: assertion failure in Schedule.c ---+ Reporter: ms43| Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime

RE: LLVM back end

2006-12-21 Thread Simon Peyton-Jones
How about * concurrency (the ability to have zillions of little stacks, with stack overflow checks and growing the stck on overflow)? * exception handling (the ability to crawl over the stack looking for exception catch frames)? * garbage collection (the ability to find pointers in

RE: LLVM back end

2006-12-21 Thread Michael T. Richter
Simon Wolfgang: OK, let me address these as far as I know them from my miniscule research so far: Global Register Variables -- I'm not sure I understand the point here. LLVM is a... well, a virtual machine. It's not a real target. The LLVM code is then either simulated in a VM (as per, say,

Re: LLVM back end

2006-12-21 Thread Wolfgang Thaller
On 21-Dec-06, at 1:26 PM, Michael T. Richter wrote: Global Register Variables -- I'm not sure I understand the point here. LLVM is a... well, a virtual machine. It's not a real target. The LLVM code is then either simulated in a VM (as per, say, Java) or it is further compiled to a

Re: Curious behaviour of irrefutable pattern.

2006-12-21 Thread Mike Gunter
In general, GHC (like every other compiler that does strictness analysis) feels free to change non-termination into a call to 'error' and vice versa. Under what circumstances does the (error - non-termination) transformation happen? I'd be unhappy if (head ) put me into an infinite loop

RE: Curious behaviour of irrefutable pattern.

2006-12-21 Thread Simon Peyton-Jones
| Do you mean if I have both an infinite loop and an error call, then I | might get only the loop? Absolutely. f x = error urk loop n = loop (n+1) main = print (f (loop 0)) The compiler figures out that f is strict, and uses call by value. Result is a loop. Simon

Re: Curious behaviour of irrefutable pattern.

2006-12-21 Thread Mike Gunter
| Do you mean if I have both an infinite loop and an error call, then I | might get only the loop? Absolutely. That's fine and what I expected. I take it, then, that the answer to the question of under what circumstances does the (error - non-termination) transformation happen? is that GHC

inlining higher-order-functions?

2006-12-21 Thread Norman Ramsey
I've just discovered the {-# INLINE #-} pragma, but it's not doing as much for me as I had hoped. My example is complicated, so let me present a simpler analogy. Suppose I defined compose :: (b - c) - (a - b) - (a - c) compose f g = \x - f (g x) I can easily persuade GHC to inline 'compose'.

[Haskell] How to make sure that a function is evaluated only once?

2006-12-21 Thread Axel Jantsch
Hello, I have a function with type f :: Int - Int - Int - Int - Int - NRup - NRdown and I want to make sure it is evaluated only once for the same set of arguments but I observe that it is always evaluated several times. f is implemented in C and called via the FFI. The C function may or may

Re: [Haskell] How to make sure that a function is evaluated only once?

2006-12-21 Thread Lemmih
On 12/21/06, Axel Jantsch [EMAIL PROTECTED] wrote: Hello, I have a function with type f :: Int - Int - Int - Int - Int - NRup - NRdown and I want to make sure it is evaluated only once for the same set of arguments but I observe that it is always evaluated several times. f is implemented in

[Haskell] ANN: hscolour-1.6

2006-12-21 Thread Malcolm Wallace
hscolour-1.6 HsColour is a syntax-highlighter for Haskell code. It can generate ANSI terminal colour codes, HTML, and CSS, and can insert hyperlink anchors for function definitions (useful in conjunction with Haddock). HsColour-1.6 is

Re: [Haskell] How to make sure that a function is evaluated only once?

2006-12-21 Thread Samuel Bronson
On 12/21/06, Axel Jantsch [EMAIL PROTECTED] wrote: I have a function with type f :: Int - Int - Int - Int - Int - NRup - NRdown and I want to make sure it is evaluated only once for the same set of arguments but I observe that it is always evaluated several times. Maybe you want to memoize

Re: [Haskell-cafe] How to serialize thunks?

2006-12-21 Thread Krasimir Angelov
Hi Joachim, All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. This is something that is implemented in Clean but this just uncovers a lot of other problems: The serialization of thunk

RE: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Simon Peyton-Jones
| One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by hand. Simon ___ Haskell-Cafe

[Haskell-cafe] Re: Haskell Side Effect

2006-12-21 Thread Zara
On Wed, 20 Dec 2006 15:24:54 -0800, Ashley Yakeley [EMAIL PROTECTED] wrote: Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in Spanish.. The side effect is: a - Being able to write in Spanish? b- Being nuts? Saludos

Re: [Haskell-cafe] Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Joachim, Wednesday, December 20, 2006, 11:22:24 AM, you wrote: The update code would now have to unmarshall a blob of game data, traverse it to find all instances of SomeData, wrap them in a one-element list to turn them into SomeData1s, reconstruct the blob of game data with the

Re: [Haskell-cafe] Versioning

2006-12-21 Thread Lemmih
On 12/20/06, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Joachim, Wednesday, December 20, 2006, 11:22:24 AM, you wrote: The update code would now have to unmarshall a blob of game data, traverse it to find all instances of SomeData, wrap them in a one-element list to turn them into

[Haskell-cafe] Timer with Haskell GUI application

2006-12-21 Thread asilovy
Hi all, I'm still trying to figure out why, in the Graphics.HGL library, is the timer not treated as the other events (mouse clics, key pressing... ? For instance see : http://haskell.org/ghc/docs/latest/html/libraries/HGL/Graphics-HGL-Window.html As I understand, the timer in a HGL GUI

[Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Joachim Durchholz
Krasimir Angelov schrieb: All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from reality. Does any Haskell implementation have that kind

Re: [Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Krasimir Angelov
On 12/21/06, Joachim Durchholz [EMAIL PROTECTED] wrote: Krasimir Angelov schrieb: All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from

[Haskell-cafe] Re: Versioning

2006-12-21 Thread Joachim Durchholz
Simon Peyton-Jones schrieb: | One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by hand. How much boilerplate would be needed

Re: [Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Neil Mitchell
Hi All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from reality. Does any Haskell implementation have that kind of RTS support?

Re[2]: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Simon, Thursday, December 21, 2006, 12:02:22 PM, you wrote: | One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Joachim, Wednesday, December 20, 2006, 9:30:02 PM, you wrote: One thing that might become a problem is that the Scrap your boilerplate approach seems to work only in GHC. There's nothing wrong with GHC, but it sounds like I'm committing to a specific compiler right from the start. I'd

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots of extensions in GHC, but Haskell 98 is a perfectly useable language! So

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Lennart Augustsson
On Dec 21, 2006, at 15:53 , Neil Mitchell wrote: Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots of extensions in GHC,

Re: [Haskell-cafe] How to serialize thunks?

2006-12-21 Thread Tomasz Zielonka
On Wed, Dec 20, 2006 at 11:03:42PM +0100, Joachim Durchholz wrote: If yes: are there workarounds? I'd really like to be able to use infinite data structures in the data that I serialize. There is an interesting technique thay allows you to serialize infinite, lazy or functional values: don't

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Lennart Augustsson wrote: I must second this opinion. There's this (false) perception that you need all kinds of extensions to make Haskell usable. It's simply not true. Certain extensions can make your life easier, but that's it. To write code in Haskell, this is true. However, one of

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi In other words, you can program in Haskell just fine without extensions. But if you want that next level in type safety, extensions is where it's at, at least for the kind of code I write. What level of safety do these type extensions give you? The biggest runtime crasher is probably

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Lennart Augustsson wrote: On Dec 21, 2006, at 15:53 , Neil Mitchell wrote: Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots

[Haskell-cafe] cabal running multiple preprocessors on one file - suggestion

2006-12-21 Thread Marc Weber
Am I right that the way to do this now is create your own preprocessor run on files havirg your extionsion? What about naming the source files eg Module.hs.cpp.di.gc.chs ? This would mean first run c2hs, then greencard thin DrIft then cpp and put the results in Module.hs.cpp.di.gc.chs 1)

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi In other words, what on earth is good about gluing oneself to Haskell98? Life's moved on... If you stick to Haskell 98 you can: * Convert your code to Clean (Hacle) * Debug it (Hat) * Run it in your browser (ycr2js) * Document it (Haddock) * Make a cross platform binary (yhc) * Get

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Neil Mitchell wrote: In other words, you can program in Haskell just fine without extensions. But if you want that next level in type safety, extensions is where it's at, at least for the kind of code I write. What level of safety do these type extensions give you? Check out many, many, many

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Henning Thielemann
On Wed, 20 Dec 2006, Imam Tashdid ul Alam wrote: Bulat Ziganshin raised: Num is intrinsically bound to the compiler. sad. so let's leave Num out. this basically means we will avoid abstract algebra in general. that is, forget groups, rings, for now, See

Re: [Haskell-cafe] Haskell Side Effect

2006-12-21 Thread Henning Thielemann
On Thu, 21 Dec 2006 [EMAIL PROTECTED] wrote: ...werbeH neve dna a n d C h i n e s e You read too much spam. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Neil Mitchell wrote: Hi In other words, what on earth is good about gluing oneself to Haskell98? Life's moved on... If you stick to Haskell 98 you can: * Convert your code to Clean (Hacle) * Debug it (Hat) * Run it in your browser (ycr2js) * Document it (Haddock) * Make a cross platform

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi True, though it would be even better if the usual extensions were more widely supported, though I suppose identifying what's useful and therefore worth supporting is the point of the Haskell Prime process. Exactly the reason for Haskell Prime. As an aside I've often thought it would be

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Scott Brickner
Jacques Carette wrote: Neil Mitchell wrote: The biggest runtime crasher is probably pattern match failings, something that most of these type extensions don't catch at all! Array out-of-bounds, fromJust, head on an empty list, and pattern-match failures are in my list of things I wish the

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Scott Brickner
Jacques Carette wrote: Lennart Augustsson wrote: I must second this opinion. There's this (false) perception that you need all kinds of extensions to make Haskell usable. It's simply not true. Certain extensions can make your life easier, but that's it. To write code in Haskell, this

Re: Low-level Haskell profiling [Was: Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project]

2006-12-21 Thread Alexey Rodriguez Yakushev
Hi Andy, On Dec 20, 2006, at 9:15, Andy Georges wrote: Well, AFAIK, PAPI abstracts away the platform dependencies quite well, so I guess your code can be run straightforward on all IA-32 platforms (depending on the events you wish to measure, which may or may not be present on all

[Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Ranjan Bagchi
Hi -- I'm still learning to use ghc effectively, and I'm trying to use it for more-or-less mundane programming tasks, hopefully in a way which is a lot more elegant than I'd do in Java or Perl. I've got a big [around a gigabyte] binary file, filled with identical binary structures

Re: Low-level Haskell profiling [Was: Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project]

2006-12-21 Thread Andy Georges
Alexey, Well, AFAIK, PAPI abstracts away the platform dependencies quite well, so I guess your code can be run straightforward on all IA-32 platforms (depending on the events you wish to measure, which may or may not be present on all platforms). PowerPC, Itanium, Mips, Alpha should work

Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Yes, dependent types have a lot to do with all this. And I am an eager lurker of all this Epigram. Scott Brickner wrote: Jacques Carette wrote: Array out-of-bounds, fromJust, head on an empty list, and pattern-match failures are in my list of things I wish the type system could help me

Re: Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Jacques Carette wrote: Yes, dependent types have a lot to do with all this. And I am an eager lurker of all this Epigram. Would it be possible to augment Haskell's type system so that it was the same as that used in Epigram? Epigram itself uses a novel 2d layout and a novel way of writing

Re: Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Lennart Augustsson
It's possible to augment Haskell type system to be the one in Epigram. But it would no longer be Haskell. :) And to meet the goals of Epigram you'd also have to remove (unrestricted) recursion from Haskell. -- Lennart On Dec 21, 2006, at 23:46 , Brian Hulley wrote: Jacques

[Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Joachim Durchholz
Tomasz Zielonka schrieb: On Wed, Dec 20, 2006 at 11:03:42PM +0100, Joachim Durchholz wrote: If yes: are there workarounds? I'd really like to be able to use infinite data structures in the data that I serialize. There is an interesting technique thay allows you to serialize infinite, lazy or

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Ross Paterson
On Thu, Dec 21, 2006 at 07:16:16PM +0100, Henning Thielemann wrote: About the question, whether functions should be provided in the most general context, I refer to http://www.haskell.org/haskellwiki/Slim_instance_declaration Certainly we all agree that a module that defines instances

Re: [Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Marc Weber
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote: Is there a fast way to do this using ghc? I can extract fields by using a ByteString, but I may not be using it fast enough: I've had to write my own routines to extract ints, longs and doubles. The other option is to write

Re: [Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Stefan O'Rear
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote: I've got a big [around a gigabyte] binary file, filled with identical binary structures (imagine a C process writing structs). I'd like to process/analyze them efficiently. In C or even Java, i'd memory map the file and

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Imam Tashdid ul Alam
hi guys, there's a page on the haskellwiki (called The Other Prelude) now which has a discussion page as well (like all wiki pages!). so let's do it. on topic: this is why I think renaming is quite unnecessary. The Other Prelude should be very concise, both conceptually and in size. IMHO this

[Haskell-cafe] State separation/combination pattern question

2006-12-21 Thread Reto Kramer
I'm looking for a pattern to use for state separation in my application. I need to write two stateful libraries. One is a partitioned in- memory store, the other a disk based store with an in-memory cache fronting it. Both store modules need the IO and State monad. My aim is to write the