Re: [Haskell-cafe] I don't understand how ST works

2012-06-09 Thread Nicu Ionita
it compiles. Thanks, Nicu Am 08.06.2012 23:15, schrieb Nicu Ionita: Hi, I created a gist with a minimal (still 111 lines) module: https://gist.github.com/2898128 I still get the errors: WhatsWrong.hs:53:5: Couldn't match type `s' with `PrimState (ST s)' `s' is a rigid type variable bound

Re: [Haskell-cafe] I don't understand how ST works

2012-06-08 Thread Nicu Ionita
Hi, I created a gist with a minimal (still 111 lines) module: https://gist.github.com/2898128 I still get the errors: WhatsWrong.hs:53:5: Couldn't match type `s' with `PrimState (ST s)' `s' is a rigid type variable bound by a type expected by the context: ST s [Move] at

[Haskell-cafe] I don't understand how ST works

2012-06-07 Thread Nicu Ionita
Hi, After trying the whole afternoon to make a program work using ST and mutable vectors, I must give up and ask for some help. I have a pure function which generates a list of moves. But the whole thing should live in the ST monad, so: genMoves ... = runST $ do ... Now, as I understand,

Re: [Haskell-cafe] Installation of the New Haskell Platform

2012-06-04 Thread Nicu Ionita
Am 04.06.2012 18:48, schrieb Brent Yorgey: On Mon, Jun 04, 2012 at 11:04:36AM -0400, Victor Miller wrote: Before I install it (on on Mac OS X Lion) is there anything, manually, that I need to do in order to keep all of the cabal packages that I've installed, or are the reinstalled

Re: [Haskell-cafe] Problem with packet documentation generated by cabal on windows 7

2012-05-25 Thread Nicu Ionita
Am 25.05.2012 06:49, schrieb Magnus Therning: On Fri, May 25, 2012 at 01:19:11AM +0200, Nicu Ionita wrote: Hi cafe, I have a problem with haddock documentation created when installing new packages with cabal on windows. The generated html files have all links in the form j:\Users\...\doc

[Haskell-cafe] Problem with packet documentation generated by cabal on windows 7

2012-05-24 Thread Nicu Ionita
Hi cafe, I have a problem with haddock documentation created when installing new packages with cabal on windows. The generated html files have all links in the form j:\Users\...\doc\...\xxx.html, but firefox says, it cannot open that link. Actually all links should be prefixed by file:///. I

Re: [Haskell-cafe] Problems with libgmp on Amazon Linux

2012-01-07 Thread Nicu Ionita
Am 07.01.2012 06:04, schrieb Yucheng Zhang: On Sat, Jan 7, 2012 at 8:08 AM, Nicu Ionitanicu.ion...@acons.at wrote: It seemed to work pretty well, with some problems when configuring HP, because although libgmp was already installed, it was not recognized. I installed the newer version 5.0.2

Re: [Haskell-cafe] Problems with libgmp on Amazon Linux

2012-01-07 Thread Nicu Ionita
Am 07.01.2012 20:01, schrieb Nabil Alsharif: Ahh your main issue is that --prefix should be /usr not /usr/lib It would be best to reinstall libgmp with the correct prefix. Oh, thanks, I will try this. ___ Haskell-Cafe mailing list

[Haskell-cafe] Problems with libgmp on Amazon Linux

2012-01-06 Thread Nicu Ionita
Hello, I saw [1] there is a lot of activity in the Haskell community regarding Amazon Web Services (AWS). As they allow an easy start [2], I decided to giv it a try and followed the procedure published by JP Moresmau [3] to install the Haskell Plattform on Amazon Linux (a minimal linux

Re: [Haskell-cafe] Comparison Haskell, Java, C and LISP

2011-10-18 Thread Nicu Ionita
Am 18.10.2011 18:53, schrieb Stephen Tetley: Haskell has no support for reflection whatsoever. It can support compile time meta-programming with Template Haskell. Reflection itself might be antagonistic to functional programming, I suspect it is at odds with referential transparency. Most of

Re: [Haskell-cafe] Much faster complex monad stack based on CPS state

2011-09-28 Thread Nicu Ionita
the 2 versions of you code? 2011/9/27 Nicu Ionita nicu.ion...@acons.at mailto:nicu.ion...@acons.at Hello list, Starting from this emails (http://web.archiveorange.com/archive/v/nDNOvSM4JT3GJRSjOm9P) I could refactor my code (a UCI chess engine, with complex functions, in which

Re: [Haskell-cafe] Much faster complex monad stack based on CPS state

2011-09-28 Thread Nicu Ionita
Am 28.09.2011 02:35, schrieb Ryan Ingram: My guess is that Cont plays really nicely with GHC's inliner, so things that end up looking like return x = \y - ... get optimized really well return x = f -- inline = = ContState $ \s0 k - runCS (return x) s0 $ \a s1 - runCS (f a) s1 k

[Haskell-cafe] Much faster complex monad stack based on CPS state

2011-09-26 Thread Nicu Ionita
Hello list, Starting from this emails (http://web.archiveorange.com/archive/v/nDNOvSM4JT3GJRSjOm9P) I could refactor my code (a UCI chess engine, with complex functions, in which the search has a complex monad stack) to run twice as fast as with even some hand unroled state transformer! So

[Haskell-cafe] SPECIALIZE in the presence of constraints

2011-09-25 Thread Nicu Ionita
Hallo List, I can't understand how pragma SPECIALIZE works in the presence of constraints. I have 2 modules, one which defines a general search framework, and one which implements it in a concrete context. The general module defines functions like: {-# SPECIALIZE pvQSearch :: Node (Game

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-09 Thread Nicu Ionita
Am 09.06.2011 19:44, schrieb Andrew Coppin: On 09/06/2011 06:54 AM, Scott Lawrence wrote: On 06/09/2011 01:47 AM, Jason Dagit wrote: Have you checked this by looking at the generated assembly? I generated some assembly from GHC on windows. Here is what it looks ilke: http://hpaste.org/47610

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-07 Thread Nicu Ionita
Am 07.06.2011 19:37, schrieb Andrew Coppin: On 06/06/2011 09:34 PM, Nicu Ionita wrote: Hi, Just to double check: that means, today it's not possible to generate 64 bit operations under Windows, including bit level .., .|. a.s.o. (from Data.Bits), and this situation will stay like

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-06 Thread Nicu Ionita
Am 23.05.2011 13:32, schrieb Simon Marlow: On 18/05/2011 19:22, Jason Dagit wrote: On Wed, May 18, 2011 at 2:50 AM, John Sneerjohnsn...@operamail.com wrote: Hello all, I know it is not probably good question to this list, but anyway, could anyone point me to some more detailed how to

AW: [Haskell-cafe] ICFP contest

2009-06-23 Thread Nicu Ionita
any idea how to start. This year I'll try again (in Haskell, of course), but you're right, alone it can be very hard. Nicu Ionita -Ursprüngliche Nachricht- Von: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] Im Auftrag von Miguel Mitrofanov Gesendet

[Haskell-cafe] Basic problem in Haskell language design?

2009-03-01 Thread Nicu Ionita
). I think this is a basic problem with the language design. In small programs it's not so bad, but in large ones this could be. What do you think about it? Are there possible solutions or workarounds? Nicu Ionita ___ Haskell-Cafe mailing list Haskell

AW: [Haskell-cafe] Re: Basic problem in Haskell language design?

2009-03-01 Thread Nicu Ionita
Ok, thanks, compiling from Eclipse I totally forgot to check the compiler flags. Nicu Ionita -Ursprüngliche Nachricht- Von: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] Im Auftrag von Stuart Cook Gesendet: Sonntag, 1. März 2009 14:45 An: haskell-cafe

AW: [Haskell-cafe] Something like optimistic evaluation

2008-04-29 Thread Nicu Ionita
I don't know if this would be worth, but theoretically one could go on and evaluate those thunks that: a) would be evaluated anyway (after the current IO operation have been completed) b) do not depend on the result of the current operation And, of course, the GC could work in this time also.

[Haskell-cafe] Need help with Parsec

2008-01-20 Thread Nicu Ionita
Hi, I'm playing since a few hours with Parsec and trying to write a small html (fragment) parser, but I'm stuck in a point which I really can't understand. The problem seem to be either in parseProperCont or in closing (see code below). It looks like closing does not work (but it is a very

[Haskell-cafe] ST Monad - what's wrong?

2007-12-09 Thread Nicu Ionita
Hi, I'm trying to use the ST monad in order to turn an almost pure function into a pure one: reading a precalculated list of primes into a prime set. But the following code brings an error: primes :: Set Integer primes = runST $ getPrimes primes10h7.txt getPrimes :: String - (forall s. ST s

[Haskell-cafe] AW: ST Monad - what's wrong?

2007-12-09 Thread Nicu Ionita
Ok, solved, the use of ($) was the problem. I changed it primes :: Set Integer primes = runST (getPrimes primes10h7.txt) and it compiles (and works too). Nicu -Ursprüngliche Nachricht- Von: Nicu Ionita [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 9. Dezember 2007 12:12