Panic

2004-06-11 Thread Arjan van IJzendoorn
Hello GHC people, I'm having a lot of fun with GHC and wxHaskell, but at one point something unwanted happened. I created a version of wxHaskell from source with extra GHC options -prof -auto-all; I wanted to have a profiling version of wxHaskell so I can get a stack trace when my program

Re: Panic

2004-06-11 Thread Sven Panne
Arjan van IJzendoorn wrote: [...] Loading package wxcore ... linking ... WARNING: Overflown relocation field (# re locs found: 30765) C:/cygwin/usr/local/lib/wxcore0.o: unknown symbol `_CC_LIST' ghc.exe: panic! (the `impossible' happened, GHC version 6.2.1): can't load package `wxcore'

Strange problems with binary file output: result of incorrect size

2004-06-11 Thread Mike Aizatsky
Hello, I'm having strange problems with binary file output. In my application I'm preparing the [Word8], then doing just 4 operations: 1. openBinaryFile 2. newListArray from my list 3. hPutArray 4. file close Everything works ok till I change one function deep in computational code. The change

[ ghc-Bugs-971327 ] ghci error

2004-06-11 Thread SourceForge.net
Bugs item #971327, was opened at 2004-06-11 18:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=971327group_id=8032 Category: None Group: 6.0 Status: Open Resolution: None

[ ghc-Bugs-971327 ] ghci error

2004-06-11 Thread SourceForge.net
Bugs item #971327, was opened at 2004-06-11 20:02 Message generated for change (Comment added) made by wthaller You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=971327group_id=8032 Category: None Group: 6.0 Status: Closed Resolution: Duplicate Priority: 5

Re: Finalizers and FFI

2004-06-11 Thread Niklas Sorensson
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 this problem a

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-11 Thread Alastair Reid
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? How? And when? I did not find any suitable place in my code to call freeHaskellFunPtr. Machine code is dynamically created when you turn a Haskell

New version of hs-plugins

2004-06-11 Thread Donald Bruce Stewart
A new version of the hs-plugins library has been released, v0.9.5. hs-plugins provides dynamic loading, runtime compilation and an eval() mechanism for Haskell plugins: http://www.cse.unsw.edu.au/~dons/hs-plugins New features: * eval :: Typeable a = String - [Import] - IO (Maybe

Re: [Haskell] topology in Haskell

2004-06-11 Thread Martin Escardo
Dear Jon, Thanks for your remarks. Jon Fairbairn writes: Interesting. But why do you use Int rather than the Integer? Ok, I admit that I should have used Integer. Moreover, in practice you would like to use [a] when I use (Int - a), as you'll notice. In particular This gives some

[Haskell] IO question

2004-06-11 Thread Tom Hofte
Hi, I have an question about the IO monad I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Kind regards Tom Hofte ___ Haskell mailing list [EMAIL PROTECTED]

Re: [Haskell] IO question

2004-06-11 Thread Tomasz Zielonka
On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use it and you really, really know what the

Re: [Haskell] IO question

2004-06-11 Thread Ronny Wichers Schreur
Tom Hofte writes (to the Haskell mailing list): I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Tomasz Zielonka replies: There is unsafePerformIO, but before you use it, think [..] See also http://www.haskell.org/hawiki/ThatAnnoyingIoType. Cheers,

Re: [Haskell] IO question

2004-06-11 Thread Keith Wansbrough
On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use it and you really, really know what the

Re: [Haskell] IO question

2004-06-11 Thread Frank Seaton Taylor
On 11 Jun 2004, at 08:50, Keith Wansbrough wrote: On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use

Re: [Haskell] IO question

2004-06-11 Thread Keith Wansbrough
(and the ghost of Launchbury whispers in my ear that this is the Haskell list, and unsafePerformIO is not Haskell!). John is dead?!?!?! Not to my knowledge, just not on the mailing list... --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of

Re: [Haskell] IO question

2004-06-11 Thread Graham Klyne
At 13:23 11/06/04 +0200, Tom Hofte wrote: Hi, I have an question about the IO monad I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Possible, but... in addition to other responses, I'd also recommend looking at this:

[Haskell] Errata to the Revised Haskell 98 Report

2004-06-11 Thread Simon Peyton-Jones
Gentle Haskellers It's pleasing that there have been so few bug reports about the Revised Haskell 98 report, which was published in January 2003. But there have been some: see http://research.microsoft.com/~simonpj/haskell98-revised/haskell98-revis ed-bugs.html and every now and again

[Haskell] Annoying naming clashes

2004-06-11 Thread Ben . Yu
Hi, when writing haskell code. It is so annoying that name clashes keep happening. I have to be careful about the data constructor names, about the class names, about the class member names. I understand that we can use class to achieve some overloading effect. However, it does not help

Re: [Haskell] IO question

2004-06-11 Thread b . i . mills
While what I want to say has implicitly been said I'd just like to suggest that there is a simple way to put the whole matter less cryptically. The obvious question that just about anyone starting with the IO monad asks is how can I write (IO a - a)? The simple answer is, you don't have to

Re: [Haskell] Annoying naming clashes

2004-06-11 Thread Tom Pledger
[EMAIL PROTECTED] wrote: Hi, when writing haskell code. It is so annoying that name clashes keep happening. I have to be careful about the data constructor names, about the class names, about the class member names. [...] As a novice haskell programmer, I might be missing something here though. If

Re: [Haskell-cafe] Join and it's relation to = and return

2004-06-11 Thread Frank Atanassow
On Jun 9, 2004, at 9:39 AM, Jerzy Karczmarczuk wrote: I have *nothing* to add, just a question. Do you /anybody/ know of any edible work on ADJUNCTIONS in the context of Haskell structures? Perhaps instead of searching for 'inverses' one should think more about adjoints?... Yes, I think this is

Re: [Haskell-cafe] Re: Haskell-Cafe Digest, Vol 10, Issue 3

2004-06-11 Thread Frank Atanassow
First, concerning your question about monads and multiplication: a monad on category C is exactly a monoid object in the category [C-C] of endofunctors on C, and natural transformations between them. A monoid in a category is, as you expect, an object X with arrows m:X*X-X and u:1-X satisfying

RE: [Haskell-cafe] RE: Modelling Java Interfaces with Existential data types

2004-06-11 Thread Mike Aizatsky
Andre, Thanks for paper pointers. Hmm, what's the higher goal of what you're trying to achieve? I, like you, came from a background of object-oriented programming, and I've always managed to avoid making a list containing more than one type after re-thinking about the problem. You can do

[Haskell-cafe] Calling Haskell from Java

2004-06-11 Thread Andrei de A. Formiga
Greetings, I need to call Haskell functions from a Java program. In the Java side, I can use JNI, which expects C-call functions exported from dynamically linked libraries. So, a primitive way to get what I want is to generate a dynamic library from Haskell code with exported ccall