[Haskell-cafe] Re: Simulating client server communication with recursive monads

2008-01-16 Thread apfelmus
[redirected to haskell-cafe] Jan Stranik wrote: Do you know what is the theoretical foundation for having mfix process side-effects in the lexical order as opposed to execution order? Could you point me to some papers, if you know of any off top your head?

[Haskell-cafe] Properties of optimizer rule application?

2008-01-16 Thread Henning Thielemann
Reading various papers and the Wiki about GHC optimizer rules I got the impression that there are not much properties I can rely on and I wonder how I can write a reliable fusion framework with this constraint. I read about the strategy to replace functions early by fusable implementations and

[Haskell-cafe] Re: [Haskell] ANN: GLFW-0.3 released

2008-01-16 Thread Duncan Coutts
On Tue, 2008-01-15 at 23:32 -0500, Paul L wrote: GLFW is a Haskell module for GLFW OpenGL framework. It provides an alternative to GLUT for OpenGL based Haskell programs. The current 0.3 version is for download from hackageDB at:

[Haskell-cafe] libmpd-haskell RFC

2008-01-16 Thread Ben Sinclair
Hello all, If anybody has already used libmpd-haskell (the darcs repo version) or would like to look over it I would appreciate their comments. Thanks, Ben http://turing.une.edu.au/~bsinclai/code/libmpd-haskell/ signature.asc Description: Digital signature

RE: [Haskell-cafe] Properties of optimizer rule application?

2008-01-16 Thread Simon Peyton-Jones
GHC has one main mechanism for controlling the application of rules, namely simplifier phases. You can say apply this rule only after phase N or apply this rule only before phase N. Similarly for INLINE pragmas. The manual describes this in detail. I urge against relying on top-down or

[Haskell-cafe] Re: Properties of optimizer rule application?

2008-01-16 Thread Roman Leshchinskiy
Henning Thielemann wrote: Reading various papers and the Wiki about GHC optimizer rules I got the impression that there are not much properties I can rely on and I wonder how I can write a reliable fusion framework with this constraint. That depends on your definition of reliable. You can't

RE: [Haskell-cafe] Properties of optimizer rule application?

2008-01-16 Thread Henning Thielemann
On Wed, 16 Jan 2008, Simon Peyton-Jones wrote: GHC has one main mechanism for controlling the application of rules, namely simplifier phases. You can say apply this rule only after phase N or apply this rule only before phase N. Similarly for INLINE pragmas. The manual describes this in

Re: [Haskell-cafe] Yi editor tutorial

2008-01-16 Thread gwern0
On 2008.01.15 22:54:08 -0800, Benjamin L. Russell [EMAIL PROTECTED] scribbled 1.8K characters: Your Yi editor tutorial looks like a fascinating idea, but I use Mac OS X (10.2.8 Jaguar, soon to be upgraded to 10.5.x Leopard) at home, and Windows XP at work, while your tutorial is based on

Re: [Haskell-cafe] ANNOUNCE: HStringTemplate -- An Elegant, Functional, Nifty Templating Engine for Haskell

2008-01-16 Thread Bit Connor
On Jan 14, 2008 9:47 AM, Sterling Clover [EMAIL PROTECTED] wrote: HStringTemplate is a port of Terrence Parr's lovely StringTemplate (http://www.stringtemplate.org) engine to Haskell. It is available, cabalized, at: darcs get http://code.haskell.org/HStringTemplate/ Template systems have

[Haskell-cafe] Re: MonadPrompt + Gtk2Hs = ?

2008-01-16 Thread apfelmus
Felipe Lessa wrote: apfelmus wrote: The type of contPromptM is even more general than that: casePromptOf' :: (r - f b) - (forall a,b. p a - (a - f b) - f b) - Prompt p r - f b casePromptOf' done cont (PromptDone r) = done r casePromptOf' done cont

[Haskell-cafe] HPC of several modules?

2008-01-16 Thread Magnus Therning
How do I get reports on coverage of all modules in a program? The documentation I've found http://blog.unsafeperformio.com/?p=18 and http://www.haskell.org/ghc/docs/latest/html/users_guide/hpc.html both do coverage of a single module. Going the naive route of first making sure there are no

Re: [Haskell-cafe] HPC of several modules?

2008-01-16 Thread Neil Mitchell
Hi and .hi files) then running 'ghc --make -fhpc MyTool.hs' succeeds in That's all I do. 'hpc6 markup MyTool' includes only Main I do: hpc markup MyTool.tix Then it all Just Works (TM). What is hpc6? I am using the version supplied with GHC 6.8. Thanks Neil

Re: [Haskell-cafe] Yi editor tutorial

2008-01-16 Thread Jules Bean
First of all, Andrew: Thanks! That was really interesting. Benjamin L. Russell wrote: Your Yi editor tutorial looks like a fascinating idea, but I use Mac OS X (10.2.8 Jaguar, soon to be upgraded to 10.5.x Leopard) at home, and Windows XP at work, while your tutorial is based on Ubuntu and the

[Haskell-cafe] Poisx select support

2008-01-16 Thread Galchin Vasili
Hello, In the ghc libraries directory I can't find the Haskell .hs/.lhsthat implements Posix select. ?? I found Select.c. Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Don Stewart
vigalchin: Hello, In the ghc libraries directory I can't find the Haskell .hs/.lhsthat implements Posix select. ?? I found Select.c. In Control.Concurrent forkIO threadDelay threadWaitRead threadWaitWrite The thread primitives are implemented in terms of

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Galchin Vasili
Hi Don, Sorry ..I wasn't clear enough.I am trying to determine from the Haskell FFI doc what datatype to use in order to model C's void *, e.g. for mmap http://www.opengroup.org/onlinepubs/95399/functions/mmap.html Regards, Vasili On 1/16/08, Don Stewart [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Don Stewart
vigalchin: Hi Don, Sorry ..I wasn't clear enough.I am trying to determine from the Haskell FFI doc what datatype to use in order to model C's void *, e.g. for mmap [1]http://www.opengroup.org/onlinepubs/95399/functions/mmap.html Regards, Vasili In the

Re: [Haskell-cafe] ANNOUNCE: Haddock version 2.0.0.0

2008-01-16 Thread Henning Thielemann
On Tue, 8 Jan 2008, David Waern wrote: Changes in version 2.0.0.0: * The GHC API is used as the front-end It's great to see this progress in Haddock. However, is Haddock now more difficult to port than before? Is there some bug- and feature request tracker for Haddock? I only know of

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Galchin Vasili
Hi Don, I am looking at the code for ghc-6.8.2 but don't see the mmap support. Is this newly wriiten by you? I would also like to help round out the Posix functionality in Haskell. Is there an accurate list of what needs to be done given the fact that maybe some work is in progress but not

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Don Stewart
vigalchin: Hi Don, I am looking at the code for ghc-6.8.2 but don't see the mmap support. Is this newly wriiten by you? I would also like to help round out the Posix functionality in Haskell. Is there an accurate list of what needs to be done given the fact that maybe

[Haskell-cafe] Data constructors versus types

2008-01-16 Thread Peter Verswyvelen
I know nothing about theoretical computer science, but I was wondering if it possible to forget about types, and just keep the concept of data constructors, and have an analyzer determine correctness of the code and staticness of the data? Basically this is what SCHEME does no? Doesn't SCHEME

Re: [Haskell-cafe] Data constructors versus types

2008-01-16 Thread Don Stewart
bf3: I know nothing about theoretical computer science, but I was wondering if it possible to forget about types, and just keep the concept of data constructors, and have an analyzer determine correctness of the code and staticness of the data? The analysis would be type inference and

[Haskell-cafe] Re: Properties of optimizer rule application?

2008-01-16 Thread Henning Thielemann
On Wed, 16 Jan 2008, Roman Leshchinskiy wrote: Henning Thielemann wrote: Reading various papers and the Wiki about GHC optimizer rules I got the impression that there are not much properties I can rely on and I wonder how I can write a reliable fusion framework with this constraint.

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Ian Lynagh
On Wed, Jan 16, 2008 at 12:40:22PM -0800, Donald Bruce Stewart wrote: If something you need is missing from there, write it as a patch against the darcs repository for `unix', http://darcs.haskell.org/packages/unix/, and submit it to [EMAIL PROTECTED] for inclusion in the next release of

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre2

2008-01-16 Thread David Roundy
On Thu, Jan 03, 2008 at 11:11:40AM +, Simon Marlow wrote: Anyhow, could you retry this test with the above change in methodology, and let me know if (a) the pull is still slow the first time and (b) if it's much faster the second time (after the reverse unpull/pull)? I think I've done

[Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Achim Schneider
Peter Verswyvelen [EMAIL PROTECTED] wrote: I know nothing about theoretical computer science, but I was wondering if it possible to forget about types, and just keep the concept of data constructors, and have an analyzer determine correctness of the code and staticness of the data?

[Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Achim Schneider
Achim Schneider [EMAIL PROTECTED] wrote: And, yes, Stalin manages to specialize a - a functions to Int - Int to make numerical code as fast or faster than C, but so does GHC. That is, seen formally, quite fuzzy. I'm going to be beaten for it. -- (c) this sig last receiving data processing

Re: [Haskell-cafe] HPC of several modules?

2008-01-16 Thread Christopher Lane Hinson
What is hpc6? I am using the version supplied with GHC 6.8. This is just hpc on debian/ubuntu systems, where all the binaries have symlinks that append a version number. ghc6.8 on debian doesn't provide hpc without the 6. I just reportbugged this. --Lane

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Peter Verswyvelen
Thank you for explaining. I was wondering if the same syntax could be used somehow (not in Haskell, in some theoretical language), I mean use an annotation to tell the compiler that a type-tag should be determined at compile time and not at runtime, otherwise - error So eg // Runtime tag, aka

[Haskell-cafe] Compiling Blobs

2008-01-16 Thread Peter Verswyvelen
I'm trying to build http://www.cs.york.ac.uk/fp/darcs/Blobs using GHC 6.8.2. It looks like a good Haskell program to learn from. So far I managed to modify the source code so it makes use of the new HaXML libraries, and after a lot of hacking I could build and link to wxHaskell, but my app

[Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-16 Thread Dominic Steinitz
Adam Langley agl at imperialviolet.org writes: On Jan 10, 2008 10:45 AM, Don Stewart dons at galois.com wrote: That's pretty much what we envisaged as the approach to take. Monad transformers adding some bit-buffer state over Get/Put. For anyone who's still reading this thread...

Re: [Haskell-cafe] ANNOUNCE: Haddock version 2.0.0.0

2008-01-16 Thread David Waern
2008/1/16, Henning Thielemann [EMAIL PROTECTED]: On Tue, 8 Jan 2008, David Waern wrote: Changes in version 2.0.0.0: * The GHC API is used as the front-end It's great to see this progress in Haddock. However, is Haddock now more difficult to port than before? Haddock is already

[Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Achim Schneider
Peter Verswyvelen [EMAIL PROTECTED] wrote: Thank you for explaining. I was wondering if the same syntax could be used somehow (not in Haskell, in some theoretical language), I mean use an annotation to tell the compiler that a type-tag should be determined at compile time and not at

[Haskell-cafe] Re: Properties of optimizer rule application?

2008-01-16 Thread Roman Leshchinskiy
Henning Thielemann wrote: To give a precise example: If I have a sequence of 'map's map f0 . map f1 . ... . map fn then there is some length where this is no longer collapsed to a single 'map'? No. After applying a rule, the simplifier optimises the result of the rewriting. This means

[Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread jerzy . karczmarczuk
Achim Schneider writes: Lisp is actually not really meant to be compiled, but interpreted. The nice thing is that it doesn't need more than a handful of primitives, a list parser and heap manager/garbage collector and evaluator, which all can be implemented in under 1000 lines of C. Things get

[Haskell-cafe] Haskell-Support in Ohloh

2008-01-16 Thread Joachim Breitner
Hi, I’m only margianlly involved or up to date there, but still some might have missed this: Ohloh has begun to release their tools, starting with ohcount, their tool to measure code and comments lines: http://labs.ohloh.net/ohcount/ They explicitly write that they want haskell support, and

Re: [Haskell-cafe] Haskell-Support in Ohloh

2008-01-16 Thread Don Stewart
mail: Hi, I’m only margianlly involved or up to date there, but still some might have missed this: Ohloh has begun to release their tools, starting with ohcount, their tool to measure code and comments lines: http://labs.ohloh.net/ohcount/ They explicitly write that they want

Re: [Haskell-cafe] ANNOUNCE: HStringTemplate -- An Elegant, Functional, Nifty Templating Engine for Haskell

2008-01-16 Thread Graham Fawcett
On Jan 14, 2008 2:47 AM, Sterling Clover [EMAIL PROTECTED] wrote: HStringTemplate is a port of Terrence Parr's lovely StringTemplate (http://www.stringtemplate.org) engine to Haskell. This is very cool. Your docs describe a function, cacheSTGroup: cacheSTGroup :: Int - STGen a - STGen a Given

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Brandon S. Allbery KF8NH
On Jan 16, 2008, at 18:58 , [EMAIL PROTECTED] wrote: Achim Schneider writes: Lisp is actually not really meant to be compiled, but interpreted. The Would you mind stopping to spread dubious truths? Certainly, Lisp processors started with simple eval/apply interpreters, since they were

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-16 Thread Adam Langley
On Jan 16, 2008 2:41 PM, Dominic Steinitz [EMAIL PROTECTED] wrote: tlv_ bin = do tagValueVal - getBits bin 5 tagConstructionVal - getBits bin 1 tagTypeVal - getBits bin 2 I'm sure I'm wrong but putting bits into [Bool] doesn't look very efficient. Of course, NewBinary

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread gwern0
On 2008.01.17 00:58:19 +0100, [EMAIL PROTECTED] scribbled 0.9K characters: Achim Schneider writes: Lisp is actually not really meant to be compiled, but interpreted. The nice thing is that it doesn't need more than a handful of primitives, a list parser and heap manager/garbage collector and

Re: [Haskell-cafe] 0/0 1 == False

2008-01-16 Thread Mitar
Hi! On Jan 11, 2008 7:30 AM, Cristian Baboi [EMAIL PROTECTED] wrote: NaN is not 'undefined' Why not? What is a semantic difference? I believe Haskell should use undefined instead of NaN for all operations which are mathematically undefined (like 0/0). NaN should be used in a languages which

[Haskell-cafe] Re: [Haskell] Simulating client server communication with recursive monads

2008-01-16 Thread Ryan Ingram
(redirected to haskell-cafe) mfix is value recursion, not effect recursion. It allows you to tie-the-knot with data being constructed recursively even in a monadic context. When you are using the Writer monad like this, the bind operation between statements in a do construct is just ++.

Re: [Haskell-cafe] 0/0 1 == False

2008-01-16 Thread Derek Elkins
On Thu, 2008-01-17 at 03:16 +0100, Mitar wrote: Hi! On Jan 11, 2008 7:30 AM, Cristian Baboi [EMAIL PROTECTED] wrote: NaN is not 'undefined' Why not? What is a semantic difference? I believe Haskell should use undefined instead of NaN for all operations which are mathematically undefined

Re: [Haskell-cafe] 0/0 1 == False

2008-01-16 Thread Felipe Lessa
On Jan 16, 2008 11:30 PM, Derek Elkins [EMAIL PROTECTED] wrote: For the love of Pete, floating point numbers are not real numbers. 0/0 is mathematically defined for floating point numbers to be NaN. If you don't want to use IEEE floating point numbers, use a different type as was suggested

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Richard A. O'Keefe
On 17 Jan 2008, at 10:56 am, Peter Verswyvelen wrote: You're talking about O(big)... But wasn't the C language in some way succesful because on the hardware at that time other much nicer languages (e.g. LISP) were just way too slow? Or was this just O(n) times slower? No. C was designed as a

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Richard A. O'Keefe
On 17 Jan 2008, at 12:31 pm, Achim Schneider wrote: Lisp is actually not really meant to be compiled, but interpreted. The classic Lisp is Lisp 1.5. The Lisp 1.5 Programmer's Manual, published in I think 1961, contains Appendix D: The Lisp Compiler. If I'm reading appendix G correctly, the

Re: [Haskell-cafe] haskelldb basic documentation needed

2008-01-16 Thread Steve Lihn
For mysql (via HDBC),some documentation is available here. But it is rather going through HDBC-ODBC-mysql. It is a bit complex than you would normally expect with mysql. http://en.wikibooks.org/wiki/Haskell/Database 2008/1/15 Justin Bailey [EMAIL PROTECTED]: 2008/1/15 Immanuel Normann [EMAIL

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Spencer Janssen
On Wed, Jan 16, 2008 at 02:09:31PM -0600, Galchin Vasili wrote: Hi Don, Sorry ..I wasn't clear enough.I am trying to determine from the Haskell FFI doc what datatype to use in order to model C's void *, e.g. for mmap http://www.opengroup.org/onlinepubs/95399/functions/mmap.html

Re: [Haskell-cafe] Poisx select support

2008-01-16 Thread Bryan O'Sullivan
Spencer Janssen wrote: For C's void *, I'd use Ptr (). Ptr a seems to be more usual, and hews closer to the idea that it's a pointer to an opaque value. b ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Peter Verswyvelen
ghc --ddump-simpl and assure that your values get unboxed... I was not really talking about boxed/unboxed values, that's another issue I think. What I was talking about is more related to the work of Neil Mitchell and Colin Runciman in their static checker for pattern matching

Re: [Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread Anton van Straaten
[EMAIL PROTECTED] wrote: On 2008.01.17 00:58:19 +0100, [EMAIL PROTECTED] scribbled 0.9K characters: Achim Schneider writes: Lisp is actually not really meant to be compiled, but interpreted. ... Would you mind stopping to spread dubious truths? ... I don't think it's a dubious truth.