Re: Dynamic Compilation

2003-06-11 Thread Koen Claessen
| Ghci and Template Haskell show that it is possible to | compile and load a module into a running program. Is | there a user interface to do that? Would one be | possible? Would that make a Haskell analog of Yaws | (yaws.hyber.org) possible? | | For those who don't know Yaws: It is a we

Re: linking ghc object files with mingw-g++

2003-05-27 Thread Koen Claessen
| I'm trying to link ghc object files with mingw's | g++/ld... We have used the g++-2 compiler that you can get with Cygwin and it seems to work fine. (mingw-g++ and the normal g++ did not work for us.) Another hint: maybe you should give "-lstdc++" as a flag to the final linking fase. A fina

System.CPUTime

2003-01-13 Thread Koen Claessen
Dear all, I have a question about the semantics of the function 'getCPUTime' in the module 'System.CPUTime'. Does it ever reset itself? I.e. is there a guarantee that if t1 is the result of a call to getCPUTime, any other call to getCPUTime will produce a result that is greater? It seems not to

Re: FFI & C++ & Cygwin

2003-01-11 Thread Koen Claessen
system used cygwin-style paths which the mingwin g++ did not understand but that was "easily" fixed by replacing mingwin's g++ by a script that first converts all its arguments which look like filenames to windows-paths and then calls mingwin's g++. Anyway, thanks for everyone&

FFI & C++ & Cygwin

2003-01-10 Thread Koen Claessen
Dear GHC users, I have the following problem and I wonder if anyone can help. I am using the FFI to talk to a library of functions written in C++. On Unixes (Solaris, Linux) this works just fine if one adds the right -ldstdc++ here and there. However, I am using Cygwin now and that is where all

RE: 5.04.2 schedule?

2002-10-25 Thread Koen Claessen
Simon Marlow wrote: | [...] and in any case binary packages always pop out | of the end of the nightly build, so building them | isn't any extra hassle. : | So I think the current situation is a good compromise: | those who want the bleeding edge can get CVS and watch | [EMAIL PROTECTED] so

RE: unsafePerformIO

2002-09-24 Thread Koen Claessen
Simon Peyton-Jones wrote: | The actions performed by unsafePerformIO are simply | done at some entirely unpredictable time, perhaps | interleaved with actions on the main execution path. But it is a fact that many of us have at least some idea of what happens "under the hood" when we use unsa

Re: mergesort

2002-06-26 Thread Koen Claessen
Simon, | 5.02 uses quicksort, but 5.04 will use mergesort | instead which has much more predictable performance | behaviour. What implementation of mergesort are you using? (Could you send me code?) I found that all implementations of mergesort I tried perform badly on large list (like 1

RE: fast IO in ghc

2002-04-03 Thread Koen Claessen
bmit a paper to the Haskell workshop about this. /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen Chalmers University, Gothenburg, Sweden. ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: How to make Claessen's Refs Ord-able?

2002-03-21 Thread Koen Claessen
| I'd like to extend the Ref type for observable sharing | of Koen Claessen's Ph.D. thesis: to make it possible | for the Refs to be the keys for efficient finite maps. I did this in the Lava implementation. The Ref module I attach works in Hugs and GHC. /Koen. module Ref ( Ref --

GHCi & Cygwin

2002-01-29 Thread Koen Claessen
(And maybe it is a general fix, since Hugs seems to suffer from exactly the same problem...) Thanks, /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen Chalmers University, Gothenburg, Sweden. ___ Glasgow-haskell-users mailing list [EMAIL PROTE

Re: FFI

2002-01-14 Thread Koen Claessen
Manuel M. T. Chakravarty wrote: | I don't think that it makes much sense coding on the | plain FFI unless there are reasons for avoiding an | extra tool or the binding is very small. Just my $0.02: I have used the plain FFI for larger projects. The initial reason I did this because my versio

RE: GHC Poll: scope in GHCi

2002-01-09 Thread Koen Claessen
| I'm currently showing the scope in the prompt, with | the modules from which we're taking the exports only | surrounded by square brackets. It is nice to show the difference. What I am looking for however is to get everything defined in a compiled module into scope. One solution might be t

Re: GHC Poll: scope in GHCi

2002-01-09 Thread Koen Claessen
| Does anyone have any better suggestions? I think any solution that leaves it transparent as to if it is a compiled or an interpreted module is fine. But I have understood that this is hard to achieve... /Koen. ___ Glasgow-haskell-users mailing l

RealWorld?

2001-12-07 Thread Koen Claessen
Hi, I want to use the functions: hGetBufBA :: Handle -> MutableByteArray RealWorld a -> Int -> IO Int hPutBufBA :: Handle -> MutableByteArray RealWorld a -> Int -> IO () But as soon as I mention their types, 'RealWorld' is not in scope. In what module is this defined? /Koen. ___

RE: Questions about sharing

2001-12-07 Thread Koen Claessen
| Yes, GHC will common these up (with -O). I'm not sure | I understand the point about the type checker not | letting you do this yourself, though: surely x and | (a:as) have the same type? In the following definition, one is not allowed to: instance Functor (Either a) where fmap f (

Non blocking versions of hGetBuf and hPutBuf

2001-09-28 Thread Koen Claessen
Are they removed in GHC-5.02? /Koen ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Socket

2001-08-09 Thread Koen Claessen
tion "hSelect" from the Select module. Has anybody had this problem before, and, if so, what could be a solution? Thanks, /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen phone:+46-31-772 5424 mailto:[EMAIL PROTECTED] -

FFI and Control-C

2001-07-31 Thread Koen Claessen
Hi, I recently started experimenting using the FFI in GHC and GHCi. In GHCi, one would like to press control-C in the middle of a computation, and get back to the prompt. It is however hard to understand how control-C and the foreign function calls interact. I noticed that GHCi does not react