ClockTime closure linking issue

2010-04-05 Thread Gracjan Polak
Hi all, Probable bug in GHC, I want to inquire before I report it proper. Did anybody see something like this: c:\Sources\happstack\happstack\templates\projectcabal build [1 of 1] Compiling Main ( Setup.hs, dist\setup\Main.o ) Linking .\dist\setup\setup.exe ... Preprocessing

Re: ClockTime closure linking issue

2010-04-05 Thread Gracjan Polak
Jeremy Shaw jeremy at n-heptane.com writes: My first guess is that it is another instance of this bug: http://hackage.haskell.org/trac/ghc/ticket/3799 Seems like putting documentation: True into C:\Users\gracjan\AppData\Roaming\cabal\config makes this error stand out -- Gracjan

Re: cabal-install-0.8 final testing

2009-12-21 Thread Gracjan Polak
Duncan Coutts duncan.coutts at googlemail.com writes: if flag(test) Buildable: True Build-depends: base5, bytestring, HUnit, directory else Buildable: False Is this solution good for the time being? If so, I'll change it to make peace and happiness prevail among

Re: cvsweb back up

2004-08-20 Thread Gracjan Polak
Is there any haddoc documentation for GHC (compiler part, not libraries)? I still have trouble finding my way through the source... Simon Marlow wrote: Thanks to Jeff Lewis, we now have cvsweb back up again. Browse on over to http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/ and enjoy!

Re: cvsweb back up

2004-08-20 Thread Gracjan Polak
Simon Marlow wrote: On 20 August 2004 12:04, Gracjan Polak wrote: Is there any haddoc documentation for GHC (compiler part, not libraries)? I still have trouble finding my way through the source... Sorry, no. You could probably run Haddock on the source, although we've never tried

Lazy version of peekArray

2004-06-22 Thread Gracjan Polak
Hi, I'm trying to make use of memory mapped files with Haskell. It is kind of fun, I managed to mmap a file (actualy CreateFileMapping, because I'm on a Windows box), managed to setup finalizers (those kind of work now, see my posts about finalizers and FFI). Now I got to content... and here

ObjectIO

2004-06-22 Thread Gracjan Polak
Hi, In the following code only processInit and processClose get ever called, other callbacks are *never* invoked. Is this known problem? Do I miss something obvious? How do I get the handle of main window? Here is the code: module Main where import Graphics.UI.ObjectIO processAttributes = [

Re: ObjectIO

2004-06-22 Thread Gracjan Polak
Gracjan Polak wrote: Hi, In the following code only processInit and processClose get ever called, other callbacks are *never* invoked. Is this known problem? Do I miss something obvious? Forgotten: Windows 2000, GHC-6.2.1 :) -- Pozdrawiam, Regards, Gracjan

Re: Finalizers and FFI

2004-06-11 Thread Gracjan Polak
Krasimir Angelov wrote: The problem here is that the external functions (instances of type FunPtr) are always executed with ccall convention regardless of stdcall declaration in the foreign import. The workaround is to write simple stub function in C with ccall convention. You are right, I did

Re: Finalizers and FFI

2004-06-11 Thread Gracjan Polak
Niklas Sorensson wrote: Arjan van IJzendoorn wrote: I couldn't get finalisers to work either with the newForeignPtr from this module. I didn't know how to create a proper FunPtr. In Foreign.Concurrent there is a newForeignPtr that is easier to use: [deleted] I seem to remeber running in to

Re: Finalizers and FFI

2004-06-11 Thread Gracjan Polak
Arjan van IJzendoorn wrote: foreign import ccall ... finaliserCreator :: IO (FunPtr (Ptr a - IO ())) and then finaliser - finaliserCreator AFAIK this creates some dynamic machine code in malloce'd area, so there is need to free it afterward with freeHaskellFunPtr. Are you doing that?

Open GL, GLUT

2004-06-11 Thread Gracjan Polak
Hi all, I'd like to make some use of OpenGL with Haskell (under Win2000). Here is some code: module Main where import Graphics.Rendering.OpenGL.GL import Graphics.Rendering.OpenGL.GLU import Graphics.UI.GLUT main = do ver - get gluVersion putStrLn ver getArgsAndInitialize

Re: Finalizers and FFI

2004-06-10 Thread Gracjan Polak
Arjan van IJzendoorn wrote: I couldn't get finalisers to work either with the newForeignPtr from this module. I didn't know how to create a proper FunPtr. In Foreign.Concurrent there is a newForeignPtr that is easier to use: [deleted] So here is the new code: {-# OPTIONS -fglasgow-exts #-}

Re: Finalizers and FFI

2004-06-10 Thread Gracjan Polak
Alastair Reid wrote: You could give the finalizer thread a chance to run by calling Control.Concurrent.yield before exiting: Thanks, it worked. This is ok for me, because my finalizer only closes some handles. Those are closed at program end anyway, so in this case I can live with it. BUT:

Re: Finalizers and FFI

2004-06-10 Thread Gracjan Polak
Alastair Reid wrote: import Foreign.ForeignPtr I couldn't get finalisers to work either with the newForeignPtr from this module. I didn't know how to create a proper FunPtr. You create a FunPtr using foreign import: foreign import ccall malloc.h free free_ptr :: FunPtr (Ptr a - IO ()) foreign

Finalizers and FFI

2004-06-09 Thread Gracjan Polak
Hi all, I would like to attach finalizer (written in Haskell) to some pointer. When the pointer won't be needed any more, finalizer should run. So here is the code: module Main where import Foreign.Ptr import Foreign.ForeignPtr import Foreign.Marshal.Alloc foreign import stdcall wrapper mkFin