Re: [Haskell-cafe] Package updates on haskell.org

2008-06-09 Thread Don Stewart
byorgey: On Thu, Jun 5, 2008 at 6:47 PM, Don Stewart [EMAIL PROTECTED] wrote: The HWN, which I'm sadly too busy to maintain now, Does this imply that you're looking for someone to take over the HWN? I'd be willing. Yep, I've spoken with Brent. He's just starting his PhD, so

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Galchin, Vasili
Thanks. Clause? regards, Vasili On Mon, Jun 9, 2008 at 12:54 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Vasili, Monday, June 9, 2008, 6:17:14 AM, you wrote: 1. standard place to import FunPtr from is Foreign.Ptr, not System.Posix 2. FunPtr is exported as abstract type, without

[Haskell-cafe] Re: Quick question for a slow program

2008-06-09 Thread apfelmus
Lanny Ripple wrote: At least when I teased apart why the first one worked it looked heap-like. Each step of the foldr pulled off the smallest nonprime and merged the next two lists guaranteeing that the next smallest nonprime would be at the head of the next step. Well, there is heap and

[Haskell-cafe] Moving forall over type constructors

2008-06-09 Thread Klaus Ostermann
At first I'd like to thank Claus, Ryan, Edsko, Luke and Derek for their quite helpful replies to my previous thread. In the course of following their advice I encountered the problem of moving a forall quantifier over a wrapper type constructor. If I have newtype Wrapper a = Wrapper a and

Re: [Haskell-cafe] Moving forall over type constructors

2008-06-09 Thread Edsko de Vries
On Mon, Jun 09, 2008 at 03:20:33PM +0200, Klaus Ostermann wrote: At first I'd like to thank Claus, Ryan, Edsko, Luke and Derek for their quite helpful replies to my previous thread. In the course of following their advice I encountered the problem of moving a forall quantifier over a

Re: [Haskell-cafe] Moving forall over type constructors

2008-06-09 Thread Klaus Ostermann
But here we have an argument that can return a Wrapper (t a) for any 'a'; that does *not* mean it can return a wrapper of a polymorphic type. If you think about 'a' as an actual argument, then you could pass 'Int' to get a Wrapper (t Int), Bool to get a wrapper (t Bool), or even (forall a.

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Ketil Malde
[EMAIL PROTECTED] writes: null filter map lookup On the contrary, these are terrible names _because_ they conflict with the Prelude. I agree. One solution would be to stuff these into Data.List. It's okay if you highly encourage or effectively mandate qualified import, like

Re: [Haskell-cafe] Moving forall over type constructors

2008-06-09 Thread Edsko de Vries
On Mon, Jun 09, 2008 at 06:55:20AM -0700, Klaus Ostermann wrote: But here we have an argument that can return a Wrapper (t a) for any 'a'; that does *not* mean it can return a wrapper of a polymorphic type. If you think about 'a' as an actual argument, then you could pass 'Int' to get

Re: [Haskell-cafe] Moving forall over type constructors

2008-06-09 Thread Sean Leather
Hi, I just found out that it *is* possible to implement the inside function, namely as follows: inside :: forall t. ((forall a. Wrapper (t a))- Wrapper (forall a. (t a))) inside x = Wrapper f where f :: forall a. (t a) f = unwrap x unwrap (Wrapper z) = z

[Haskell-cafe] ANNOUNCE: hfann-01

2008-06-09 Thread Olivier Boudry
Hi all, I'm pleased to announce the first release of the hfann module ( http://code.haskell.org/~oboudry/hfann/). This module is an interface to the Fast Artificial Neural Network (FANN) library (see http://leenissen.dk/fann/). This is an early release. At the moment the hfann module does not

[Haskell-cafe] Unable to hc-build ghc 6.6.1

2008-06-09 Thread Re, Joseph (IT)
I'm trying to do a registered hc-build on linux2.4 x86 with ghc 6.6.1. After fixing mk/bootstrap.mk to include -lncurses in HC_BOOT_LIBS to get past an undefined reference to tputs et al, I've gotten stuck with the following undefined reference error:

Re: [Haskell-cafe] ANNOUNCE: hfann-01

2008-06-09 Thread Olivier Boudry
On Mon, Jun 9, 2008 at 11:29 AM, Don Stewart [EMAIL PROTECTED] wrote: Excellent. Would you like to upload it to hackage.haskell.org, so it can be easily installed with the 'cabal install' tool? Hi all, As suggested by Don, I just uploaded the hfann package to hackage.haskell.org. It's

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Galchin, Vasili
In any case, what I want to do is store FunPtr in a data type and marshall into a C struct as a C function pointer. Vasili On Mon, Jun 9, 2008 at 1:24 AM, Galchin, Vasili [EMAIL PROTECTED] wrote: Thanks. Clause? regards, Vasili On Mon, Jun 9, 2008 at 12:54 AM, Bulat Ziganshin [EMAIL

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Duncan Coutts
On Mon, 2008-06-09 at 16:04 +0200, Ketil Malde wrote: I think designing modules for qualified-only use is a mistake. I also think import lists get quite ugly, with multiple instances of import qualified Data.Set as S import Data.Set (Set) for multiple - sometimes even the

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Ryan Ingram
type Notify = Sigval - IO () foreign import ccall wrapper mkNotify :: Notify - IO (FunPtr Notify) then main = do notifyFPtr - mkNotify notifyFunc -- rest of code here -- then, when you are done and nothing is referencing the pointer any more freeHaskellFunPtr notifyFPtr On

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Adam Vogt
* On Monday, June 09 2008, Duncan Coutts wrote: And - is there a way to make GHCi use aliased qualification? I find my self typing detailed taxonomies all the time there. The ghci syntax currently is: :m Data.Set wouldn't it be much nicer as: import Data.Set then we could have the obvious:

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Johan Tibell
On Mon, Jun 9, 2008 at 4:04 PM, Ketil Malde [EMAIL PROTECTED] wrote: I think designing modules for qualified-only use is a mistake. I also think import lists get quite ugly, with multiple instances of I was only suggesting avoiding namespacing prefixes/suffixes in identifiers. Other than that

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Xiao-Yong Jin
Johan Tibell [EMAIL PROTECTED] writes: Duncan's recommendation of just taking the part after the last dot seems like a good rule of thumb. Doing import qualified Data.Map as M does gain you much in my opinion. Compare M.empty to emptyM. No difference, you still can't deduce the module by

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Nicolas Pouillard
Excerpts from johan.tibell's message of Mon Jun 09 21:53:50 +0200 2008: On Mon, Jun 9, 2008 at 4:04 PM, Ketil Malde [EMAIL PROTECTED] wrote: I think designing modules for qualified-only use is a mistake. I also think import lists get quite ugly, with multiple instances of I was only

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-09 Thread Sebastian Sylvan
On Thu, Jun 5, 2008 at 4:19 PM, Johan Tibell [EMAIL PROTECTED] wrote: * Why is this practice common in Haskell Here are some guesses: 1. It's common in papers. However, papers and libraries are quite different. The former usually build up a small vocabulary and having short names is a

Re: [Haskell-cafe] File locking wishlist

2008-06-09 Thread Joachim Breitner
Hi again, Am Donnerstag, den 05.06.2008, 17:22 +0200 schrieb Joachim Breitner: Hi, for a program of mine (darcswatch[1]), a rather long running process is run at certain events (by cron, and by new emails). I want to achieve that: * Only one instance of the program runs at a time. * If

[Haskell-cafe] ANN: funsat 0.5, a SAT solver written in Haskell

2008-06-09 Thread Denis Bueno
Hi all, It is my pleasure to announce the first reasonable release of funsat, a modern, DPLL-style SAT solver written in Haskell. Funsat solves formulas in conjunctive normal form and produces a total variable assignment for satisfiable problems. It is available from Hackage:

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Galchin, Vasili
Ryan, I tried but the compiler didn't seem to like the keyword import: [EMAIL PROTECTED]:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell Setup.lhs build Preprocessing executables for Test-1.0... Building Test-1.0... [1 of 1] Compiling Main ( ./timer.hs,

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Judah Jacobson
2008/6/9 Galchin, Vasili [EMAIL PROTECTED]: Ryan, I tried but the compiler didn't seem to like the keyword import: [EMAIL PROTECTED]:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell Setup.lhs build Preprocessing executables for Test-1.0... Building Test-1.0... [1 of 1] Compiling

Re: [Haskell-cafe] FunPtr error?

2008-06-09 Thread Galchin, Vasili
Thanks Judah ... getting closer now. Vasili On Mon, Jun 9, 2008 at 11:25 PM, Judah Jacobson [EMAIL PROTECTED] wrote: 2008/6/9 Galchin, Vasili [EMAIL PROTECTED]: Ryan, I tried but the compiler didn't seem to like the keyword import: [EMAIL