Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Victor Nazarov
> Is this still up-to-date with the way GHC/GHCi work internally? Then > I'll certainly check it out. I think it isn't since STG is pretty much different with the G-machine describes in the book. The original paper about Spineless Tagless G-machine is here [1]. It is quite verbose. Recent paper "H

Re: Additional thunk for function

2007-09-21 Thread Tim Chevalier
On 9/21/07, Victor Nazarov <[EMAIL PROTECTED]> wrote: > Here is some more details: > > % ghc -c -ddump-stg T1.hs > > STG syntax: > T1.map = > \u [] > let { > map1_sdR = > \r [f_sdN ds_sdI] > case ds_sdI

Re: Additional thunk for function

2007-09-21 Thread Victor Nazarov
Here is some more details: % ghc -c -ddump-stg T1.hs STG syntax: T1.map = \u [] let { map1_sdR = \r [f_sdN ds_sdI] case ds_sdI of wild_sdU { [] -> [] []; : x_sdM

Additional thunk for function

2007-09-21 Thread Victor Nazarov
I have reproduced it on 2 Windows machines with ghc 6.6 and 6.6.1 Here is the version information for ghc used to generate output in original message. % ghc -v Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.6 Using package config file: C:\Program Files\Visual Has

RE: Additional thunk for function

2007-09-21 Thread Simon Peyton-Jones
Looks wrong! You don't say what version. Not happening with 6.6.1 or the 6.8 release candidate ghc-6.8.0.20070916 -c -ddump-stg T1.hs -O STG syntax: T1.map = \r [f_s6M ds_s6H] case ds_s6H of wild_s6S { [] -> [] []; : x_

RE: FFI program seg faulting

2007-09-21 Thread Ben Gaster
Hello, Please excuse the clear fact that I was being stupid here and having now looked further at what a GHC replacement main must look like I have managed to call the correct initialization functions. Sorry about that. Ben Benedict R. Gaster S/W Architecture Team Lead ClearSpeed Technolo

FFI program seg faulting

2007-09-21 Thread Ben Gaster
Hi, I am trying to build a very simple Haskell function (foo) which I can then call from C, using an example I got from the GHC FFI Wiki. The problem is that the resulting program fails to run with a seg fault. Here is the code: ---Haskell Module start (Foo.hs) module Foo where

Re: STG to JavaScript translation

2007-09-21 Thread Victor Nazarov
On 9/20/07, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: > > | Cool, is it implemented in 2.8? Function tagging seems promising for > | performance. But it isn't implementable in JavaScript :) > > I think it'll be in GHC 6.8. > I've meant 6.8 :) -- vir http://vir.comtv.ru/ _

Additional thunk for function

2007-09-21 Thread Victor Nazarov
What is the purpose for GHC to allocate a thunk for some functions? Why Test.map is not a function, but updatable thunk, which should become equal to the function just after the first call? Here is the details: > % ghc -c test.hs -ddump-stg > > STG syntax: