Re: [Haskell-cafe] ghci debugger problem with :continue. is it broken, or is it me?

2009-04-27 Thread Bernie Pope
2009/4/28 Thomas Hartman I suppose this means that the points-free/pattern binding-style > version is a bit less work for ghc to execute (fewer reductions), > whereas the version with lambda bound variables is easier to debug. I don't think there is any (significant) difference between them in

[Haskell-cafe] LondonHUG talk: Engineering Large Projects in Haskell

2009-04-27 Thread Don Stewart
Slides from last week's London HUG http://www.londonhug.net/ talk are now online. The talk attempts to document some of the tips and tricks Galois has accumulated using Haskell commercially for the past 10 years. You can now read the slides of the talk here: http://www.galois.com/blog/2009/0

[Haskell-cafe] Problem with installing phooey

2009-04-27 Thread Daryoush Mehrtash
When I try to install Phooey I get the following error: cabal install --constraint="Stream == 0.3" phooey Resolving dependencies... [1 of 1] Compiling Main ( /tmp/phooey-2.016943/phooey-2.0/Setup.lhs, /tmp/phooey-2.016943/phooey-2.0/dist/setup/Main.o ) Linking /tmp/phooey-2.016943/pho

Re: [Haskell-cafe] createProcess problem

2009-04-27 Thread Brandon S. Allbery KF8NH
On Apr 27, 2009, at 18:55 , Vasili I. Galchin wrote: ["-p blastn"] -- CLI args createProcess expects a list of individual argument strings. You're sending it a single argument ["-p blastn"]; you want to send it two arguments ["-p", "blastn"] (or ["-pblastn"] without the spa

Re: [Haskell-cafe] Question about implementing an off-side rule in Parsec 2

2009-04-27 Thread Ryan Ingram
I don't have experience solving this problem, but I've read a few horror stories from people who had state affect the results of parsing in Parsec. Haskell's layout rules replace indentation levels with braces and semicolons; you could run an initial "tokenizing" parser that builds tokens includin

Re: [Haskell-cafe] createProcess problem

2009-04-27 Thread Felipe Lessa
On Mon, Apr 27, 2009 at 06:00:52PM -0500, Vasili I. Galchin wrote: > I feel that it has something to do with double quotes in Haskell ... > probably something obviously silly that I am doing. The problem is that ["-p blastn"] means that there's only one argument, while ["-p", "blastn"] means what

Re: [Haskell-cafe] createProcess problem

2009-04-27 Thread Claude Heiland-Allen
Hi Vasili, Vasili I. Galchin wrote: > [snip] > import System.Process main = do handle <- runProcess "blastall" -- executable ["-p blastn"] -- CLI args Try: ["-p", "blastn"] This passes multiple command line arguments instead of just one that contain

[Haskell-cafe] createProcess problem

2009-04-27 Thread Vasili I. Galchin
Hello, I am trying to use createProcess. Following is a small fragment. I am trying to run a program called blastall (a bio-informatics program). It is kind of like mv/cp/ln on Unix platforms (where the executable examines the program, i.e. arg[0], and then provides appropriate behavior/semantics

Re: [Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread Donn Cave
Quoth siki , > The actual problem is quite similar to the one that I provided or to the one > in the description of the proposed extension that you linked. > > Someone on another forum suggested record functions but I'm not sure I > understood correctly how that would work around this problem. An

[Haskell-cafe] createProcess problem

2009-04-27 Thread Vasili I. Galchin
Hello, I am trying to use createProcess. Following is a small fragment. I am trying to run a program called blastall (a bio-informatics program). It is kind of like mv/cp/ln on Unix platforms (where the executable examines the program, i.e. arg[0], and then provides appropriate behavior/semantics

[Haskell-cafe] Announce: GraphViz: Change of Maintainer

2009-04-27 Thread Matthew Sackman
I no longer have the time to continue development of the (apparently, judging from the number of emails I'm getting, rather popular) graphviz package. Fortunately, Ivan Lazar Miljenovic who has extended it himself and sent me patches (some of which I did get round to folding in) has agreed to take

Re: [Haskell-cafe] Can subclass override its super-class' defaultimplementation of a function?

2009-04-27 Thread Claus Reinke
Basically, I have a bunch of instances that have a common functionality but I'd like to be able to group those instances and give each group a different default implementation of that functionality. It's so easy to do this in Java, for example, but I have no idea how to do it in Haskell. The above

[Haskell-cafe] LAST CALL: Haskell Communities and Activities Report

2009-04-27 Thread voigt
Dear Haskellers, It is not yet too late to contribute to the May 2009 edition of the Haskell Communities and Activities Report. If you haven't already, please write an entry for your new project, or update your old entry. Please mail your entries to h...@haskell.org in LaTeX format. More informa

Re: [Haskell-cafe] Question about implementing an off-side rule in Parsec 2

2009-04-27 Thread Jason Dagit
On Mon, Apr 27, 2009 at 2:41 PM, Bas van Gijzel wrote: > Hello everyone, > > I'm doing a bachelor project focused on comparing parsers. One of the parser > libraries I'm using is Parsec (2) and I'm going to implement a very small > subset of haskell with it, with as most important feature the off-

[Haskell-cafe] Question about implementing an off-side rule in Parsec 2

2009-04-27 Thread Bas van Gijzel
Hello everyone, I'm doing a bachelor project focused on comparing parsers. One of the parser libraries I'm using is Parsec (2) and I'm going to implement a very small subset of haskell with it, with as most important feature the off-side rule (indentation based parsing) used in function definition

Re: [Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread siki
The actual problem is quite similar to the one that I provided or to the one in the description of the proposed extension that you linked. Someone on another forum suggested record functions but I'm not sure I understood correctly how that would work around this problem. Any suggestion is greatl

Re: [Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread Ryan Ingram
No, but functionality similar to this has been proposed several times, under the name "Class Aliases" [1]. The big problem is in the definition of B: class (A a) => B a where ... In this case, you must make something an instance of A before it can be an instance of B, and, in order to make som

Re: [Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread Martijn van Steenbergen
siki wrote: I'm not sure if this is possible at all. I'd like to do something like this: class A a where foo :: a -> Double foo a = 5.0 class (A a) => B a where foo a = 7.0 This is currently not possible in Haskell. It's been proposed, though: http://haskell.org/haskellwik

Re: [Haskell-cafe] Converting IO [XmlTree] to [XmlTree]

2009-04-27 Thread Jason Dusek
2009/04/21 Manlio Perillo : > Luke Palmer ha scritto: >> And many other permutations, with differing degrees of >> laziness and parametericity. > > As long as you stricly read a string from the socket, this is > ok. But you can not read a string lazily. Why not? It changes the way in which the p

[Haskell-cafe] Can subclass override its super-class' default implementation of a function?

2009-04-27 Thread siki
I'm not sure if this is possible at all. I'd like to do something like this: class A a where foo :: a -> Double foo a = 5.0 class (A a) => B a where foo a = 7.0 data Blah = Blah data Bar = Bar instance A Blah instance B Bar let blah = Blah bar = Bar foo blah -- should

Re: [Haskell-cafe] how can one load Prelude into ghci?

2009-04-27 Thread Brandon S. Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 27, 2009, at 12:25 , Thomas Hartman wrote: One reason it would be nice to be able to do this, is you could then get lambdabot :src style listings of prelude function definitions by using the ghci debugger and :list for prelude functions. I t

Re: [Haskell-cafe] ghci debugger problem with :continue. is it broken, or is it me?

2009-04-27 Thread Thomas Hartman
Most enlightening, thanks. The same effect can be seen with Debug.Trace.trace around the two versions of f. I suppose this means that the points-free/pattern binding-style version is a bit less work for ghc to execute (fewer reductions), whereas the version with lambda bound variables is easier t

Re: [Haskell-cafe] Re: Converting IO [XmlTree] to [XmlTree]

2009-04-27 Thread Martijn van Steenbergen
Tillmann Rendel wrote: Achim Schneider wrote: In other words: 1) Explain Pointed 2) Explain Functor 3) Explain Applicative 4) Explain Monad Why Pointed first? Functor seems more useful and more basic. They are in order of power: every monad is an applicative; every applicative is a functor

Re: [Haskell-cafe] Re: Converting IO [XmlTree] to [XmlTree]

2009-04-27 Thread Tillmann Rendel
Achim Schneider wrote: In other words: 1) Explain Pointed 2) Explain Functor 3) Explain Applicative 4) Explain Monad Why Pointed first? Functor seems more useful and more basic. Tillmann ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:

[Haskell-cafe] Re: Typing efficient folds

2009-04-27 Thread Keith Battocchi
Matthew Brecknell brecknell.org> writes: > [...] > Nest ((,) (l b) (l b)) ~ Nest (l' b') > l' ~ (,) (l b) > b' ~ (l b) -- (5) > > Unifying (2) and the result type from (3): > > n ((,) (z b) (z b)) ~ n (z' b') > z' ~ (,) (z b) > b' ~ (z b) -- (6) > > >From (5) and

Re: [Haskell-cafe] Thread priority?

2009-04-27 Thread Don Stewart
semanticphilosopher: > Count me in too > > I've got a library that endeavours to deliver 'rate-equivalence' - i.e > there may be some jitter in when the events should have occurred but > their long term rate of progress is stable. > > Testing has shown that I can get events to occur at the righ

Re: [Haskell-cafe] Thread priority?

2009-04-27 Thread Don Stewart
semanticphilosopher: > Count me in too > > I've got a library that endeavours to deliver 'rate-equivalence' - i.e > there may be some jitter in when the events should have occurred but > their long term rate of progress is stable. > > Testing has shown that I can get events to occur at the righ

Re: [Haskell-cafe] Thread priority?

2009-04-27 Thread Don Stewart
lane: > > Is there any interest or movement in developing thread priority or any > other realtime support in Haskell? I think thread priorities would be really cool :) -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

Re: [Haskell-cafe] How to install HOpenGL to Windows?

2009-04-27 Thread Sven Panne
Am Montag, 27. April 2009 00:11:20 schrieb Duncan Coutts: > On Sun, 2009-04-26 at 19:03 +0200, Sven Panne wrote: > [...] > >* How to link programs using OpenGL > > This is because the GL libs are called different names on different > platforms right? But they're consistent within each platform,

Re: [Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Krzysztof Kościuszkiewicz
On Mon, Apr 27, 2009 at 02:10:28PM +0100, Duncan Coutts wrote: > If you're using ghc 6.10 then the solution is to update to cabal-install > 0.6.x. If you're quite sure you are using 6.8 then the bug is unknown. > It may still be worth trying upgrading to cabal-install 0.6.x. I've upgraded to caba

Re: [Haskell-cafe] ANN: atom-0.0.2

2009-04-27 Thread Don Stewart
tomahawkins: > Atom is a DSL in Haskell for designed hard realtime embedded programs. > At Eaton, we are using it to control hydraulic hybrid refuse trucks > and shuttle buses. After my talk at CUFP > (http://cufp.galois.com/2008/schedule.html), a few people inquired > about atom -- I finally had

[Haskell-cafe] how can one load Prelude into ghci?

2009-04-27 Thread Thomas Hartman
One reason it would be nice to be able to do this, is you could then get lambdabot :src style listings of prelude function definitions by using the ghci debugger and :list for prelude functions. is this possible? so far I have tried thart...@ubuntu:~/haskellInstalls/ghcInstalls/source/ghc-6.10.1/

Re: [Haskell-cafe] "subscribing" to the comments, online Real World Haskell

2009-04-27 Thread John Goerzen
Michael P Mossey wrote: > Michael P Mossey wrote: >> However, I would like some ability to subscribe to specific comments. I >> want to see if people have replied to me or what the latest discussion is. > > Okay, to follow up my own post, I discovered the subscription > button for each chapter.

Re: [Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Krzysztof Kościuszkiewicz
On Mon, Apr 27, 2009 at 02:10:28PM +0100, Duncan Coutts wrote: > > [...] > > Increasing verbosity does not help, memory consumption goes up after the > > message "Resolving dependencies..." shows up. > > > > I use ghc 6.8.2 and cabal-install version 0.5.1 using version 1.4.0.1 of > > the Cabal li

[Haskell-cafe] Re: Is 78 characters still a good option? Was: breaking too long lines

2009-04-27 Thread Christian Maeder
Richard O'Keefe wrote: > > On 25 Apr 2009, at 8:59 pm, Miguel Mitrofanov wrote: > >> Something like >> >> newtype MyCoolMonad = MyCoolMonad (FirstTransformer (SecondTransformer >> (ThirdTransformer Whatever))) deriving (Functor, Monad, FirstClass, >> SecondClass, ThirdClass, SomeOtherClass) [...]

Re: [Haskell-cafe] old-time conflict when installing phooey

2009-04-27 Thread Duncan Coutts
On Sun, 2009-04-26 at 21:49 -0700, Daryoush Mehrtash wrote: > > When I try to install phooey I get conflict with old-time that I am > not sure how to resolve. Any ideas? > > > > cabal install phooey > Resolving dependencies... > cabal: dependencies conflict: ghc-6.10.1 requires old-time ==1.0.

Re: [Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Duncan Coutts
On Mon, 2009-04-27 at 12:56 +0200, Krzysztof Kościuszkiewicz wrote: > Hello Haskell-Café, > > I have a problem with high memory usage of cabal-install. Whenever I > try to install or upgrade a package, cabal manages to consume 1,3G of > memory before I killed it (on a 32-bit machine with 1 GB of

Re: [Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Krzysztof Skrzętnicki
Jakiej platformy dokładnie dotyczy Twój problem? Proponuję upgrade do najnowszej wersji - można ją ściągnąć ze strony GHC. Pozdrawiam Krzysztof Skrzętnicki 2009/4/27 Krzysztof Kościuszkiewicz : > Hello Haskell-Café, > > I have a problem with high memory usage of cabal-install.  Whenever I > try

[Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Krzysztof Kościuszkiewicz
Hello Haskell-Café, I have a problem with high memory usage of cabal-install. Whenever I try to install or upgrade a package, cabal manages to consume 1,3G of memory before I killed it (on a 32-bit machine with 1 GB of memory). Increasing verbosity does not help, memory consumption goes up after

[Haskell-cafe] RE: [Haskell] ANN control-monad-exception-0.1: Explicitly typed exceptions

2009-04-27 Thread Simon Peyton-Jones
Is there a Haskell Wiki page on extensible exceptions? The paper is a fine reference, it'd be cool to have a wiki page giving programmer-oriented guidance, saying what comes with GHC what other packages are available and some simple examples of how to use them. Simon | -Or

[Haskell-cafe] Re: old-time conflict when installing phooey

2009-04-27 Thread Andy Stewart
Hi, Daryoush Mehrtash writes: > When I try to install phooey I get conflict with old-time that I am not sure > how to resolve. Any > ideas? > >> cabal install phooey > Resolving dependencies... > cabal: dependencies conflict: ghc-6.10.1 requires old-time ==1.0.0.2 however > old-time-1.0.0.2 wa

Re: [Haskell-cafe] Typing efficient folds

2009-04-27 Thread Matthew Brecknell
Keith Battocchi wrote: > data Nest a = Nil | Cons(a, (Nest (Pair a))) > type Pair a = (a,a) > > pair f (a,b) = (f a, f b) > > efold :: forall n m b. > (forall a. n a) > -> (forall a . (m a, n (Pair a)) -> n a) > -> (forall a. Pair (m a) -> m (Pair a)) > -> (forall l z. (l b -> m (z b))