RE: Curious behaviour of irrefutable pattern.

2006-12-22 Thread Simon Peyton-Jones
| I take it, then, that the answer to the question of under what | circumstances does the (error - non-termination) transformation | happen? is that GHC can choose among different bottoms that are | present in the program. It can't, however, willy-nilly convert my | error calls to bottom. (Or

RE: inlining higher-order-functions?

2006-12-22 Thread Simon Peyton-Jones
| 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'. | But when 'compose' is applied to known arguments, I wish | f and g to be inlined in the

Re: Curious behaviour of irrefutable pattern.

2006-12-22 Thread Bernie Pope
On 22/12/2006, at 7:14 PM, Simon Peyton-Jones wrote: | I take it, then, that the answer to the question of under what | circumstances does the (error - non-termination) transformation | happen? is that GHC can choose among different bottoms that are | present in the program. It can't,

importing in place and packages

2006-12-22 Thread Ashley Yakeley
I'm compiling the files for package javavm with GHC 6.6 (using -package-name javavm). As part of the compilation process, I need a runnable program that uses the modules I've compiled in place: import JVMBoot But I get this error when compiling my Main module (ShowClasses.hs):

RE: importing in place and packages

2006-12-22 Thread Simon Peyton-Jones
The main program must be in package 'main', which is why compiling ShowClasses with -package-name javavm doesn't work. I'll modify the documentation to say this more clearly When you say import JVMBoot, and your javavm package is not installed, GHC thinks you mean JVMBoot from package main.

Re: importing in place and packages

2006-12-22 Thread Ashley Yakeley
Simon Peyton-Jones wrote: Anyway, the solution for you is to install it. I can't install it, the package isn't finished being built at that point. Or perhaps I could find a way of installing the partial package to the user database. I build part of package javavm. Then I use that to build

RE: importing in place and packages

2006-12-22 Thread Simon Peyton-Jones
Hmm. Ghc doesn't really give you a way to *run* a package which is so partly-built that you can't install it. That's perhaps not clever, but I think it's the current story. | point. Or perhaps I could find a way of installing the partial package | to the user database. That sounds plausible

Re: Curious behaviour of irrefutable pattern.

2006-12-22 Thread Mike Gunter
Bernie Pope [EMAIL PROTECTED] writes: ... Mike, what do you mean by willy nilly convert my error calls to bottom? Simon Peyton-Jones [EMAIL PROTECTED] writes: In general, GHC (like every other compiler that does strictness analysis) feels free to change non-termination into a call to

Running GHC on the IBM Cell

2006-12-22 Thread Suter, Jaap
Hello, I'm trying to get GHC to run on the Cell processor. That is, just on the PPU PowerPC side. The SPUs will continue to run C programs, managed and driven by a Haskell manager on the PPU. I'm mostly interested in GHC for its concurrency features (STM in particular). Not knowing much about

Re: inlining higher-order-functions?

2006-12-22 Thread Bulat Ziganshin
Hello Norman, Friday, December 22, 2006, 8:23:57 AM, you wrote: compose :: (b - c) - (a - b) - (a - c) compose f g = \x - f (g x) ghc 6.6 added 'inline' function, see user docs. although only SPJ knows whether it can be used here: compose f g = inline (\x - f (g x)) -- Best regards, Bulat

Re: LLVM back end

2006-12-22 Thread John Meacham
On Thu, Dec 21, 2006 at 12:54:50AM +0100, Wolfgang Thaller wrote: ad c) While they are supported in theory, I couldn't get LLVM to generate any tailcalls. Maybe I've done something wrong, maybe they're not really implemented yet. it seems that ghc could benefit from a tail-call