Hi again,
On 10/17/07, Bernd Brassel <[EMAIL PROTECTED]> wrote:
> > May I suggest a third route that has the advantages of both your
> > approaches. The backside is of course that it takes a bit of work. My
> > suggestion is to do an effect analysis of your curry programs to
> > identify the purel
Bernd Brassel wrote:
* I'm not sure if you care whether they are performed once or
many times. E.g.
f = \x. x + unsafePerformIO (h z)
If the (h z) doesn't mention 'x', GHC will transform this to
v = unsafePerformIO (h z)
f = \x. x+v
So now the effe
I think you'll find it useful to be explicit about what you are relying on.
For example I think that if your program contains two calls
unsafePerformIO e1
unsafePerformIO e2
then
* You don't care about the *order* in which these are performed
* You do care that they are both p
Hi Bernd,
Bernd Brassel wrote:
Hi David,
thank you! This is really useful information!
I think it's the let floating (out) together with common subexpression
elimination:
> ghc --make -O2 -no-recomp -fno-cse -o curry-no-cse curry.hs
[1 of 1] Compiling Main ( curry.hs, curr
On 10/17/07, Bernd Brassel <[EMAIL PROTECTED]> wrote:
> > why do you want to do this unsafely,
> > instead of just using 'length'? unsafePerformIO is a very slow
> > function, remember)
>
> The big picture is that we generate programs like this example in order
> to compile the functional logic la
Hi Stefan!
Thanks for your answer.
Stefan O'Rear wrote:
> Might I suggest, that the problem is your use of unsafePerformIO?
Yes you might. And you are surely right. But not using it in this way is
not an alternative.
> why do you want to do this unsafely,
> instead of just using 'length'? un
On Tue, Oct 16, 2007 at 04:06:26PM +0200, Bernd Brassel wrote:
> Hi Neil, hi Don!
>
> Nice meeting you at ICFP by the way.
>
> > Can you give a specific example of what you have tried to do, and how it
> > failed?
>
> I have attached a short synopsis of what our Curry to Haskell
> conceptually d
Hi,
I think it's the let floating (out) together with common subexpression
elimination:
> ghc --make -O2 -no-recomp -fno-cse -o curry-no-cse curry.hs
[1 of 1] Compiling Main ( curry.hs, curry.o )
Linking curry-no-cse ...
> ghc --make -O2 -no-recomp -fno-full-laziness -o curry-no
Neil Mitchell schrieb:
> It varies by each piece of code, can you post a code fragment that
> gets optimised in the wrong way?
Sorry for posting this twice! I have added the code to the other thread.
Thanks!
Bernd
___
Glasgow-haskell-users mailing lis
Hi Neil, hi Don!
Nice meeting you at ICFP by the way.
> Can you give a specific example of what you have tried to do, and how it
> failed?
I have attached a short synopsis of what our Curry to Haskell
conceptually does. I could explain what all the parts mean and why they
are defined this way, i
bbr:
> Hello,
>
> I am writing a compiler from the functional logic language Curry to
> Haskell. As the result is a real extension of Haskell, there has to be
> SOME side effect involved. Unfortunately, this seems to prevent me from
> using any of ghc's optimizations on the resulting code. I have
Hi Bernd,
> I am writing a compiler from the functional logic language Curry to
> Haskell. As the result is a real extension of Haskell, there has to be
> SOME side effect involved. Unfortunately, this seems to prevent me from
> using any of ghc's optimizations on the resulting code. I have tried
12 matches
Mail list logo