Re: Bug in users manual, 6.4.2, section on pattern guards

2006-07-21 Thread Simon Marlow
Matthew Cox wrote: One example given in this discussion is: clunky env var1 var1 = case lookup env var1 of Nothing - fail Just val1 - case lookup env var2 of Nothing - fail Just val2 - val1 + val2 where fail = val1 + val2 this needs to be fixed to: clunky env var1 var1 = case

Re: Bug in GHC 6.4.1 and 6.4.2

2006-07-21 Thread Simon Marlow
Fritz Henglein wrote: According to a message from GHCi, version 6.4.1 (see below; bug also reproduceable with 6.4.2, though not shown here since it consistently resulted in a core dump without prior message) under Windows XP (fully updated per 2006-07-15), I am herewith reporting what appears to

Lookup module and package defining x?

2006-07-21 Thread Marc Weber
Has somene already implemented something like: $ghc-pkg --where-from ParseError package parsec: defining modules: Text.ParserCombinators.Parsec.Error, Text.ParserCombinators.Parsec ? lambdabot @index does what I want, but not with my libs installed only locally.. This might be used by any

Re: Lookup module and package defining x?

2006-07-21 Thread Duncan Coutts
On Fri, 2006-07-21 at 10:12 +0200, Marc Weber wrote: Has somene already implemented something like: $ghc-pkg --where-from ParseError package parsec: defining modules: Text.ParserCombinators.Parsec.Error, Text.ParserCombinators.Parsec Have you tried Hoogle? http://haskell.org/hoogle/

Re: Heap Profiling Question

2006-07-21 Thread Simon Marlow
Rich Fought wrote: I'm trying to use heap profiling with +RTS -hc -i1 options and running my program for about 30 seconds. However, I only get around 7 samples with seemingly bogus timetags (i.e. 0.00, 3.69, 3.73, 3.10, 4.05, 4.12). What's going on? I'm running GHC 6.4.2 on Windows

Re: Lookup module and package defining x?

2006-07-21 Thread Marc Weber
$ghc-pkg --where-from ParseError package parsec: defining modules: Text.ParserCombinators.Parsec.Error, Text.ParserCombinators.Parsec Have you tried Hoogle? http://haskell.org/hoogle/ I know it. But I don't know yet which source it takes (haskell - source, haddck html files, ...) ? My

Re: Lookup module and package defining x?

2006-07-21 Thread Malcolm Wallace
Marc Weber [EMAIL PROTECTED] wrote: My purpose: After having found the a function I want to use it without having to search where does it belong to and where does it come from. I want it beeing as up to date as the installed libraries. You can download Hoogle as a command-line tool, and give

Re: Lookup module and package defining x?

2006-07-21 Thread Neil Mitchell
Hi, My purpose: After having found the a function I want to use it without having to search where does it belong to and where does it come from. I'm not sure what you are asking for? Where does it come from? Surely thats just the module name - which hoogle easily gives you. If there is some

Re: Heap Profiling Question

2006-07-21 Thread Rich Fought
Simon Marlow wrote: IIRC the timestamps ignore time spent in GC and time spent sampling the heap, so they measure runtime of the program only. So if I have a server that is idle most of the time waiting for requests, the timestamps recorded in the heap profile will not be real time but

Re[2]: Lookup module and package defining x?

2006-07-21 Thread Bulat Ziganshin
Hello Marc, Friday, July 21, 2006, 3:21:29 PM, you wrote: I don't know wether you've ever prorgammed in Java using Eclipse? After using a type you can press C-S-o to update all imports which will give you the choice which one to use if there is more than one opportunity. It would be nice to

Re: Heap Profiling Question

2006-07-21 Thread Rich Fought
On a separate issue, I can't seem to get the -hcname or -hmname options to work. For instance, profiling with just -hm yields an entry for module Network.HTTP, yet when I try to profile again with -hmNetwork.HTTP, I do not get a heap dump. Is there some special formatting I am missing?

regex.h included with GHC 6.4.2

2006-07-21 Thread Rich Fought
Am I crazy or is there an error in regex.h included with GHC? On line 110 there appears to be an extraneous or unterminated 'extern C {' Regards, Rich ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

[Haskell] ANN: monadic probabilistic functional programing

2006-07-21 Thread Stefan Karrmann
Dear all, the library PFP by Martin Erwig is quite useful for probabilistic calculations. I have extended it to abstract monads, cabal and darcs, confer [1]. I cannot find a licence or legal note on the page of Martin Erwig. Therefore, I can legally only publish a patch. Unfortunatly, darcs does

[Haskell] PLAN-X 2007: Call for Papers and Demos

2006-07-21 Thread Torsten Grust
[ Dear all, I'd love to see contributions from the Haskell and FP community to this upcoming edition of PLAN-X! Best wishes, -- Torsten ] Call for Papers and Software Demonstrations P L A N - X 2 0 0 7 Programming

Re: [Haskell] ANN: monadic probabilistic functional programing

2006-07-21 Thread Taral
On 7/19/06, Stefan Karrmann [EMAIL PROTECTED] wrote: Unfortunatly, darcs does not provide a method to extract patches as far as I know. (Hints are welcomed.) darcs diff and darcs annotate. -- Taral [EMAIL PROTECTED] You can't prove anything. -- Gödel's Incompetence Theorem

Re: [Haskell] using the ffi with callbacks

2006-07-21 Thread Taral
On 7/20/06, Evan Martin [EMAIL PROTECTED] wrote: But I also don't quite understand how the typing works out. For example, can you use StablePtr directly with FFI functions, or do they require you casting through Ptr? Yes. You can use any Storable with FFI functions, as far as I know. StablePtr

Re: [Haskell] Package mounting proposal

2006-07-21 Thread Stefan Karrmann
My 2 cents: Sven Moritz Hallberg (Sun, Jul 16, 2006 at 01:24:43AM +0200): [...] She must specify it somehow. Two possibilities come to mind: 1. Add a field to the package description of foo (v1.4, say) that says I'm backwards-compatible with 1.3. When building, this relation

Re: [Haskell] ANN: monadic probabilistic functional programing

2006-07-21 Thread Stefan Karrmann
Dear all, I have renamed all files. Because of this the darcs diff contains *all* source lines. Then it is not only a patch but also the complete original work. Moreover, the patch does not contain a move from or unlink of the old locations. Taral (Fri, Jul 21, 2006 at 11:22:22AM -0500): On

Re: [Haskell] ANN: monadic probabilistic functional programing

2006-07-21 Thread Tomasz Zielonka
On Fri, Jul 21, 2006 at 10:26:04PM +0200, Stefan Karrmann wrote: I have renamed all files. Because of this the darcs diff contains *all* source lines. Then it is not only a patch but also the complete original work. Moreover, the patch does not contain a move from or unlink of the old

Re: [Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-21 Thread Jon Fairbairn
On 2006-07-20 at 18:31BST I wrote: On 2006-07-13 at 10:16BST I wrote: Hooray! I've been waiting to ask Why aren't we asking what laws hold for these operations? Having thought about this for a bit, I've come up with the below. This is intended to give the general idea -- it's not

RE: Re[4]: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Simon Peyton-Jones
| | ps: you successfully going through all the standard Haskell troubles | in | | this area :) seems that making FAQ about using ST monad will be a | | good idea :) | | Indeed. If someone would like to start one, a good place for it would be | GHC's collaborative-documentation Wiki |

[Haskell-cafe] seq - RTFM?

2006-07-21 Thread Dusan Kolar
Hello all, my question is probably dull. So answers to better investigate manual are welcome. Why is this correct? ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.4.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/

Re: [Haskell-cafe] seq - RTFM?

2006-07-21 Thread Piotr Kalinowski
On 21/07/06, Dusan Kolar [EMAIL PROTECTED] wrote: Prelude putStr Ahoj\n Ahoj Prelude putStr Ahoj\n `seq` 3+3 6 Prelude :q Leaving GHCi. And not Prelude putStr Ahoj\n Ahoj Prelude putStr Ahoj\n `seq` 3+3 Ahoj 6 Well, I understand that seq evaluates the first argument. But the result of

Re: [Haskell-cafe] seq - RTFM?

2006-07-21 Thread Christophe Poucet
Hello Dusan, The reason why that does not work as you expect it to is because the type of the whole expression is not monadic. Therefore it will basically evaluate the action until it's an action ready to be executed, but not execute it, cause it's not in the IO monad. It's the same as having a

[Haskell-cafe] Still not dead

2006-07-21 Thread Einar Karttunen
Hello As many of you may have noticed I have been away for some months. This has been due to health problems which have unfortunately kept me unable to work on Haskell projects. I am not dead and will be working on resolving the backlog of messages (will probably take a week). I will be slowly

[Haskell-cafe] HXT - problems with runIOSLA or xread

2006-07-21 Thread Niklas
Hi everybody, and especially Uwe Schmidt et al. I ran into some problems trying to process some xml from a string source, illustrated in the code below. From file, using readDocument, everything works great though. I've probably missed a finer detail or two in the arrow handling, or it could be

Re: Re[4]: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Chad Scherrer
The IO monad hasn't given me too much trouble, but I want to be sure to structure things the way they should be. If I get everything running using IO first and then have type-checking problems with ST, it will be tempting to just slap on an unsafePerformIO and call it good. Sure, it's really

[Haskell-cafe] Re: ANN: System.FilePath 0.9

2006-07-21 Thread Simon Marlow
Neil Mitchell wrote: I have also added a canonicalPath function, support for spotting file\con as invalid and fixing it, support for \\?\ paths (if you don't know what they are, don't look it up, they are quite painful!) and a few very obscure corner cases which broke some of the properties.

[Haskell-cafe] Re: ANN: System.FilePath 0.9

2006-07-21 Thread Neil Mitchell
Hi, I haven't been following this discussion very closely, but this caught my eye. Has anyone pointed out yet that eliminating .. in a FilePath isn't valid in the presence of symbolic links? I vaguely recall that this is why Krasimir's System.FilePath library doesn't include normalisation.

Re: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread S C Kuo
Not totally relevant to what the discussion has evolved to, but I wrote a factorial function using STRefs (in the spirit of the Evolution of a Haskell programmer) and I think it qualifies as a really simple example. Code follows: import Data.STRef import Control.Monad.ST foreach ::

Re: [Haskell-cafe] Re: ANN: System.FilePath 0.9

2006-07-21 Thread David Menendez
Neil Mitchell writes: We should avoid referring to $PATH as the path, since we already have FilePath. Agreed, but I couldn't come up with a better name, if anyone has any suggestions. searchPath? -- David Menendez [EMAIL PROTECTED] http://www.eyrie.org/~zednenem/

[Haskell-cafe] incoherent instance selection when it should be still coherent

2006-07-21 Thread Ralf Lammel
The following pain is sort of ghc (6.4.2) specific. (The same behavior is achievable with hugs -98 +O which is Ok in so far that +O (as opposed to +o) is not strongly supposed to be coherent.) Note the following GHC options preceding the code. They do not contain -fallow-incoherent-instances.

Re: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Bryan Burgers
On 7/21/06, S C Kuo [EMAIL PROTECTED] wrote: Not totally relevant to what the discussion has evolved to, but I wrote a factorial function using STRefs (in the spirit of the Evolution of a Haskell programmer) and I think it qualifies as a really simple example. Code follows: import Data.STRef