RE: [Haskell-cafe] The weirdest error I've ever seen...

2009-11-13 Thread Simon Peyton-Jones
It's not a bad error message -- it's a crash, and that should never happen. Ideally, boil down the program to something small that still exhibits the crash, and submit that. Perhaps just the newtype declaration alone, with supporting definitions for ContextMatch etc? Try removing unnecessary

[Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Dominic Steinitz
I've been generating Haskell using haskell-src-exts but the prettyprinter isn't producing what I would expect. I would expect parse . prettyPrint == id i.e. the AST should be unchanged if you prettyprint it then parse it. Here's an example generated expression: App (App (Var (UnQual (Ident

Re: [Haskell-cafe] C structures

2009-11-13 Thread Vasiliy G. Stavenko
I need anyones experience. Possibly this old post of mine can help: http://therning.org/magnus/archives/315 Oh... WHile i was trying to repeat after you, it's become clear to me that this is not actually what I want. I want to create some structure, say data WM = WM {some_info ::

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Andrew Coppin
Casey Hawthorne wrote: Why in a pattern match like score (1 3) = 7 can I not have sizeMax = 3 score (1 sizeMax) = 7 If I had a dollar for every time I've written something like case msg of eVENT_QUIT - ... eVENT_POST - ... eVENT_RESIZE - ... and spent an hour trying to

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Colin Paul Adams
Andrew == Andrew Coppin andrewcop...@btinternet.com writes: Andrew Casey Hawthorne wrote: Why in a pattern match like score (1 3) = 7 can I not have sizeMax = 3 score (1 sizeMax) = 7 If I had a dollar for every time I've written

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Andrew Coppin
Colin Paul Adams wrote: If I had a dollar for every time I've written something like Andrew case msg of eVENT_QUIT - ... eVENT_POST - ... Andrew eVENT_RESIZE - ... Andrew and spent an hour trying to figure out why the messages Andrew aren't being processed right... ;-) So

Re: [Haskell-cafe] Resource compilation in GHC

2009-11-13 Thread Duncan Coutts
On Thu, 2009-11-12 at 11:52 +0100, David Virebayre wrote: On Thu, Nov 12, 2009 at 11:12 AM, Konstantin Vladimirov konstantin.vladimi...@gmail.com wrote: Hello. I'm writing an wxHaskell application. Everything is ok, but now I need a separate folder for icons, bitmaps, and so on, from

Re: [Haskell-cafe] Sometimes pinned memory?

2009-11-13 Thread Duncan Coutts
On Wed, 2009-11-11 at 13:14 -0800, Gregory Crosswhite wrote: Hey everyone! Do you have any suggestions for how I might allocate an aligned block of memory that I can pin while making foreign calls, but leave unpinned the rest of the time to potentially improve allocation and garbage

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Malcolm Wallace
(And, entertainingly, because the incorrect version is perfectly valid source code, no compiler errors or warnings...) If you actually turn on compiler warnings (-Wall), I think you will see something like andrew.hs:10:10: Warning: This binding for `eVENT_QUIT' shadows the existing

Re: [Haskell-cafe] Problem with JHC

2009-11-13 Thread John Meacham
On Wed, Nov 11, 2009 at 07:25:14PM +0100, Paolino wrote: FWIW, I just compiled JHC 0.7.2 with ghc 6.12 , doing a couple of corrections to make it compile, which I don't think they are related to this *bug*. Testing the given code, it aborts for every inputs I give it L 1, T AND [L 1,L 2]

Re: [Haskell-cafe] Problem with JHC

2009-11-13 Thread John Meacham
On Wed, Nov 11, 2009 at 01:26:03PM -0800, Philippos Apolinarius wrote: Ops, the paste is wrong, but the bug is real. I mean, if I try to run the program with the right input, the program aborts in the same place, with the same error message: phi...@desktop:~/jhctut$ ./jtestarbo Give me a

Re: [Haskell-cafe] Re: Opinion about JHC

2009-11-13 Thread John Meacham
On Thu, Nov 12, 2009 at 09:20:54PM +0100, Gour wrote: John Yup. This was a major goal. compiling for iPhones and embedded John arches is just as easy assuming you have a gcc toolchain set up. John (at least with the hacked iPhone SDK.. I have never tried it with John the official one) Is

Re: [Haskell-cafe] Re: Opinion about JHC

2009-11-13 Thread John Meacham
On Thu, Nov 12, 2009 at 10:44:22PM -0500, Braden Shepherdson wrote: The only annoying part was having to build with jhc outside the scratchbox environment and then build the C output inside the scratchbox. This is necessary because jhc is not self-hosting and I couldn't get GHC to build

Re: [Haskell-cafe] Opinion about JHC

2009-11-13 Thread John Meacham
On Wed, Nov 11, 2009 at 01:47:43PM -0500, Lennart Augustsson wrote: Do you use jhc when you develop jhc? I.e., does it compile itself. For me, this is the litmus test of when a compiler has become usable. I mean, if even the developers of a compiler don't use it themselves, why should anyone

[Haskell-cafe] Final CFP: WFLP 2010. Deadlines extended: Abstract due Nov 18; Full paper due Nov 25 (LNCS)

2009-11-13 Thread Pablo Nogueira
[Deadlines extended: Abstract due Nov 18; Full paper due Nov 25] Final Call For Papers 19th International Workshop on Functional and (Constraint) Logic Programming

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Daniel Fischer
Am Freitag 13 November 2009 11:05:15 schrieb Andrew Coppin: Colin Paul Adams wrote: If I had a dollar for every time I've written something like Andrew case msg of eVENT_QUIT - ... eVENT_POST - ... Andrew eVENT_RESIZE - ... Andrew and spent an hour trying to figure out

Re: [Haskell-cafe] Weird dependency failure log

2009-11-13 Thread Ross Paterson
On Thu, Nov 12, 2009 at 06:32:48PM -0200, Maurí­cio CA wrote: There's one thing special about bindings-DSL. It's a package with a set of macros for hsc2hs, and contains no Haskell code. Maybe this revealed some hidden error in package dependency checking. This is a package with no library and

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Niklas Broberg
Hi Dominic, On Fri, Nov 13, 2009 at 9:49 AM, Dominic Steinitz domi...@steinitz.org wrote: I would have expected the prettyprinter to produce this: pay tPD (a (length tOD + -1)) Do I have to write my own prettyprinter? Do I have to put in explicit parentheses? The latter seems unsatisfactory

[Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Maurí­cio CA
There's one thing special about bindings-DSL. It's a package with a set of macros for hsc2hs, and contains no Haskell code. Maybe this revealed some hidden error in package dependency checking. This is a package with no library and no executables. That's not supposed to work. It contains

[Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4

2009-11-13 Thread Michael Lesniak
Hello, I'm currently developing some applications with explicit threading using forkIO and have strange behaviour on my freshly installed Ubuntu Karmic 9.10 (Kernel 2.6.31-14 SMP). Setup: Machine A: Quadcore, Ubuntu 9.04, Kernel 2.6.28-13 SMP Machine B: AMD Opteron 875, 8 cores, 2.6.18-164

[Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4

2009-11-13 Thread Michael Lesniak
Hello, I'm currently developing some applications with explicit threading using forkIO and have strange behaviour on my freshly installed Ubuntu Karmic 9.10 (Kernel 2.6.31-14 SMP). Setup: Machine A: Quadcore, Ubuntu 9.04, Kernel 2.6.28-13 SMP Machine B: AMD Opteron 875, 8 cores, 2.6.18-164

Re: [Haskell-cafe] Cabal and autogenerated files

2009-11-13 Thread Jeremy O'Donoghue
On Thu, 12 Nov 2009 18:16 +, Duncan Coutts duncan.cou...@googlemail.com wrote: On Thu, 2009-11-12 at 17:54 +, Jeremy O'Donoghue wrote: Hi all, Another, probably simple, question regarding cabalization. Part of wxcore, the low level abstraction in wxHaskell, consists of

[Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
Hi, I have looked the concept of monoid and something related, but still, I do not know why we use it? -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Rafael Gustavo da Cunha Pereira Pinto
Disclaimer: I don't really know all about category theory, so some definitions might not be absolutely correct. Monoid is the category of all types that have a empty value and an append operation. The best example is a list. instance Monoid [a] where mempty = [] mappend = (++)

Re: [Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 12:08 -0200, Maurí­cio CA wrote: There's one thing special about bindings-DSL. It's a package with a set of macros for hsc2hs, and contains no Haskell code. Maybe this revealed some hidden error in package dependency checking. This is a package with no library

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Stephen Tetley
2009/11/13 Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com: Monoid is the category of all types that have a empty value and an append operation. Or more generally a neutral element and an associative operation: The multiplication monoid (1,*) 9*1*1*1 = 9 1 is neutral but

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Andrew Coppin
Stephen Tetley wrote: 2009/11/13 Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com: Monoid is the category of all types that have a empty value and an append operation. Or more generally a neutral element and an associative operation: The multiplication monoid (1,*)

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Eugene Kirpichov
There is an astonishing number of things in programming that are monoids: - Numbers, addition, 0 - Numbers, multiplication, 1 - Lists, concatenation, [] (including strings) - Sorted lists, merge with respect to a linear order, [] - Sets, union, {} - Maps, left-biased or right-biased union,

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magnus Therning
On Fri, Nov 13, 2009 at 4:52 PM, Andrew Coppin andrewcop...@btinternet.com wrote: Stephen Tetley wrote: 2009/11/13 Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com: Monoid is the category of all types that have a empty value and an append operation. Or more generally a

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
Hum... simple like that. So you meant the Monoid just abstracts/represents the ability to build a stack, right? 2009/11/14 Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com: Disclaimer: I don't really know all about category theory, so some definitions might not be absolutely

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Andrew Coppin
Magnus Therning wrote: On Fri, Nov 13, 2009 at 4:52 PM, Andrew Coppin andrewcop...@btinternet.com wrote: A class that represents any possible thing that can technically be considered a monoid seems so absurdly general as to be almost useless. If you don't know what an operator *does*, being

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
That is OK. Since understand the basic concept of monoid (I mean the thing in actual math), the idea here is totally not hard for me. But the sample here does not show why (or how) we use it in programming, right? On Sat, Nov 14, 2009 at 12:48 AM, Stephen Tetley stephen.tet...@gmail.com wrote:

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Stephen Tetley
2009/11/13 Magnus Therning mag...@therning.org: On Fri, Nov 13, 2009 at 4:52 PM, Andrew Coppin andrewcop...@btinternet.com wrote: This is the thing. If we had a class specifically for containers, that could be useful. If we had a class specifically for algebras, that could be useful. But a

[Haskell-cafe] Re: Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Maurí­cio CA
I have looked the concept of monoid and something related, but still, I do not know why we use it? I don't know if it's a good example, but it's simple. This package I wrote uses reverse polish notation to write gtk2hs layout windows. http://hackage.haskell.org/package/gtk2hs-rpn Since the

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Rafael Gustavo da Cunha Pereira Pinto
*...in my humble opinion. (Which, obviously, nobody else will agree with.) * I somewhat agree with your opinion!! What I miss the most is practical examples: 1) A function that uses a Monoid as a container 2) A function that uses Monoid as algebra and so on, for most of categories. I had a

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
I see. Then what is about Dual and Endo? Especially Endo, I completely confused 2009/11/14 Eugene Kirpichov ekirpic...@gmail.com: There is an astonishing number of things in programming that are monoids:  - Numbers, addition, 0  - Numbers, multiplication, 1  - Lists, concatenation, []

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread David Leimbach
On Fri, Nov 13, 2009 at 8:52 AM, Andrew Coppin andrewcop...@btinternet.comwrote: Stephen Tetley wrote: 2009/11/13 Rafael Gustavo da Cunha Pereira Pinto rafaelgcpp.li...@gmail.com: Monoid is the category of all types that have a empty value and an append operation. Or more generally

Re: [Haskell-cafe] Re: Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
It is a great example, shows both howto and benefits. Thanks. 2009/11/14 Maurí­cio CA mauricio.antu...@gmail.com:  I have looked the concept of monoid and something related, but still, I do not know why we use it? I don't know if it's a good example, but it's simple. This package I wrote

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Edward Kmett
A monoid is just an associative binary operation with a unit. They appear all over the place. Why do we bother to talk about them in programming? Well, it turns out that there are a lot of ways you can take advantage of that fairly minimal amount of structure. For one, you could take any

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Eugene Kirpichov
For every monoid (M, *, u), the dual to it is the monoid (Dual M, \x y - y * x, u) For every type A, there exists the A-endomorphism monoid (A-A, (.), id). Endo A is just a newtype for A - A. More simply, dualization is flipping the binary operation, and the endo monoid is the monoid of functions

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Anton van Straaten
Andrew Coppin wrote: This is the thing. If we had a class specifically for containers, that could be useful. If we had a class specifically for algebras, that could be useful. But a class that represents any possible thing that can technically be considered a monoid seems so absurdly general

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread David Place
Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Message: 26 Date: Sat, 14 Nov 2009 01:11:27 +0800 From: Magicloud Magiclouds magicloud.magiclo...@gmail.com Subject: Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid? To: Stephen Tetley

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magicloud Magiclouds
Thank you guys. I think I learned a lot. Pretty confusing and interesting. 2009/11/14 Eugene Kirpichov ekirpic...@gmail.com: For every monoid (M, *, u), the dual to it is the monoid (Dual M, \x y - y * x, u) For every type A, there exists the A-endomorphism monoid (A-A, (.), id). Endo A is

[Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Maurí­cio CA
This is a package with no library and no executables. That's not supposed to work. Why shouldn't this be supposed to work? It does install needed files (two include files for hsc2hs), and they do stand for themselves to justify a package of its own. Header files are associated with a

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Gregory Collins
Magicloud Magiclouds magicloud.magiclo...@gmail.com writes: I see. Then what is about Dual and Endo? Especially Endo, I completely confused It should help to look at the instances: -- | The dual of a monoid, obtained by swapping the arguments of 'mappend'. newtype Dual a = Dual {

Re: [Haskell-cafe] Package Woes

2009-11-13 Thread Lemmih
On Thu, Nov 12, 2009 at 4:47 AM, Daniel Fischer daniel.is.fisc...@web.de wrote: Sorry, slightly off-topic. I wanted to install LHC to compare that to GHC and JHC, but alas: da...@linux-mkk1:~/Haskell/LHC/lhc-0.8 cabal install -fwith-libs -flhc-regress Resolving dependencies... Configuring

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Stephen Tetley
Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: That is OK. Since understand the basic concept of monoid (I mean the thing in actual math), the idea here is totally not hard for me. But the sample here does not show why (or how) we use it in programming, right? Hi Magicloud

Re: [Haskell-cafe] Package Woes

2009-11-13 Thread Daniel Fischer
Am Freitag 13 November 2009 18:58:22 schrieb Lemmih: We no longer use libffi and I've removed the dependency. However, you're most likely to hit further obstacles when it comes to building the base libraries for LHC. I recommend waiting for the next stable release. Is there already a

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Reid Barton
On Fri, Nov 13, 2009 at 08:37:57PM +0300, Eugene Kirpichov wrote: For every monoid (M, *, u), the dual to it is the monoid (Dual M, \x y - y * x, u) The entirely standard name for this is the opposite monoid. The only places I have seen the name dual monoid used to mean opposite monoid are in

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Edward Kmett
On Fri, Nov 13, 2009 at 1:10 PM, Stephen Tetley stephen.tet...@gmail.comwrote: Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: That is OK. Since understand the basic concept of monoid (I mean the thing in actual math), the idea here is totally not hard for me. But the sample

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Stephen Tetley
Hi Edward Many thanks. I've mostly used groupoid for 'string concatenation' on types that I don't consider to have useful empty (e.g PostScript paths, bars of music...), as string concatenation is associative it would have been better if I'd used semigroup in the first place (bounding box union

[Haskell-cafe] Writing great documentation

2009-11-13 Thread Max Rabkin
Haskellers, I have heard many complaints about the average quality on documentation. Therefore, I'd like to encourage you all to read Jacob Kaplan-Moss's series on writing great documentation: http://jacobian.org/writing/great-documentation/. The articles are themselves well-written and contain

Re: [Haskell-cafe] Writing great documentation

2009-11-13 Thread Tom Tobin
On Fri, Nov 13, 2009 at 1:51 PM, Max Rabkin max.rab...@gmail.com wrote: I have heard many complaints about the average quality on documentation. Therefore, I'd like to encourage you all to read Jacob Kaplan-Moss's series on writing great documentation:

Re: [Haskell-cafe] Opinion about JHC

2009-11-13 Thread Neil Mitchell
Hi John, Do you use jhc when you develop jhc?  I.e., does it compile itself. For me, this is the litmus test of when a compiler has become usable. I mean, if even the developers of a compiler don't use it themselves, why should anyone else? :) Well, this touches on another issue, and that

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Neil Mitchell
Hi Niklas, Do I have to write my own prettyprinter? Do I have to put in explicit parentheses? The latter seems unsatisfactory as my generated AST is unambiguous and bracketing ought to be part of the prettyprinter. The former would be quite a lot of code as there are many cases to

[Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Andy Gimblett
Hi all, This email is literate Haskell. I'm trying to use type families to express some dependencies between type classes, and I'm running into trouble, I think because I'm producing chains of dependencies which the checker can't resolve... Here's a minimised version of the state I've got

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread David Menendez
On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote: First a type family where the type Y is functionally dependent on the type X, and we have a function from Y to (). class X a where   type Y a   enact :: Y a - () This is ambiguous. Type families are not injective

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Andy Gimblett
Ack. I've just realised that P/Q is not a functional dependency. I need to use a multi-parameter type class there. So my question is probably completely pointless - sorry! Thanks anyway, -Andy On 13 Nov 2009, at 20:26, Andy Gimblett wrote: Hi all, This email is literate Haskell. I'm

Re: [Haskell-cafe] Opinion about JHC

2009-11-13 Thread Lennart Augustsson
Thanks Neil, That was indeed my point. Since a compiler is a substantial program I would have more confidence it a compiler that is self-hosting. Surely you must have tried? -- Lennart On Fri, Nov 13, 2009 at 8:08 PM, Neil Mitchell ndmitch...@gmail.com wrote: Hi John, Do you use jhc when

[Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Simon Michael
Thanks for this topic and the link; I'm going to try to use it to improve the docs for hledger and my other projects. (And I agree, he's wrong about auto-generated docs.) I seem to remember admiring Parsec's documentation. Though, that reminds me.. A very common problem with online docs is

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Daniel Fischer
Am Freitag 13 November 2009 21:36:59 schrieb David Menendez: On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote: First a type family where the type Y is functionally dependent on the type X, and we have a function from Y to (). class X a where   type Y a   enact

Re: [Haskell-cafe] faster compiling for ghc

2009-11-13 Thread Nicolas Pouillard
Excerpts from Jason Dagit's message of Fri Nov 13 02:25:06 +0100 2009: On Thu, Nov 12, 2009 at 2:57 AM, Neil Mitchell ndmitch...@gmail.com wrote: Hi, I'd really love a faster GHC! I spend hours every day waiting for GHC, so any improvements would be most welcome. Has anyone built a

Re: [Haskell-cafe] Cabal and autogenerated files

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:24 +, Jeremy O'Donoghue wrote: So I take it that these modules are generated from nothing rather than something like happy/alex pre-processors where the .hs files are generated from .y/.x files. Cabal supports the latter fairly well and you can add custom

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Andy Gimblett
Hahaha, this is what I get for trying to think about Haskell on a Friday night. Now I think it _is_ a functional dependency after all. Who knows how long it will be before I change my mind again? :-) I shall think about this more carefully tomorrow... Thanks again, -Andy On 13 Nov 2009,

Re: [Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Max Rabkin
On Fri, Nov 13, 2009 at 10:58 PM, Simon Michael si...@joyful.com wrote: A very common problem with online docs is fragmentation. Absolutely! Is it possible to include non-haddock documentation in a cabal package. Is it possible to have it readable on Hackage? I think this would help with the

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 20:08 +, Neil Mitchell wrote: Hi Niklas, Do I have to write my own prettyprinter? Do I have to put in explicit parentheses? The latter seems unsatisfactory as my generated AST is unambiguous and bracketing ought to be part of the prettyprinter. The former

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread David Menendez
On Fri, Nov 13, 2009 at 4:00 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Am Freitag 13 November 2009 21:36:59 schrieb David Menendez: I recall seeing a discussion of this in the GHC documentation, but I can't seem to locate it. Perhaps

Re: [Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:53 -0200, Maurí­cio CA wrote: This is a package with no library and no executables. That's not supposed to work. Why shouldn't this be supposed to work? It does install needed files (two include files for hsc2hs), and they do stand for themselves to justify

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Magnus Therning
On 13/11/09 18:43, Edward Kmett wrote: [..] Watch out, in more common parlance, having just an binary operation is a magma, while having a category with full inverses yields a groupoid. I haven't seen many people use the older groupoid term for magmas, if only because they started to have

Re: [Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Magnus Therning
On 13/11/09 21:20, Max Rabkin wrote: On Fri, Nov 13, 2009 at 10:58 PM, Simon Michael si...@joyful.com wrote: A very common problem with online docs is fragmentation. Absolutely! Is it possible to include non-haddock documentation in a cabal package. Is it possible to have it readable on

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:16 -0200, Rafael Gustavo da Cunha Pereira Pinto wrote: ...in my humble opinion. (Which, obviously, nobody else will agree with.) I somewhat agree with your opinion!! What I miss the most is practical examples: 1) A function that uses a Monoid as a container

[Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Gour
On Fri, 13 Nov 2009 22:31:54 + Duncan == Duncan Coutts duncan.cou...@googlemail.com wrote: Duncan I rather like the idea of using markdown (pandoc) for separate Duncan non-reference docs like man pages, tutorials, user guides etc Duncan rather than trying to make haddock do everything. I'd

Re: [Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 23:20 +0200, Max Rabkin wrote: On Fri, Nov 13, 2009 at 10:58 PM, Simon Michael si...@joyful.com wrote: A very common problem with online docs is fragmentation. Absolutely! Is it possible to include non-haddock documentation in a cabal package. Is it possible to have it

[Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Maurí­cio CA
Header files are associated with a library. If there is no library then nothing gets registered. This is by design. If it's not a library, nothing can depend on it. But please tell me then where my package fits. I'm not sure I understand the question. Can you clarify what you

Re: [Haskell-cafe] looking for a good algorithm

2009-11-13 Thread Casey Hawthorne
Sorry, I forgot to ask an important question. Is the table stored in a dense format as in complete rows and complete columns or in a sparse table format? The question is more about algorithm than Haskell. But I am going to code in Haskell which I am still learning. Suppose I have a large

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Casey Hawthorne
Thank you to all who replied, very instructive. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] FFI binding -- different behaviour under compilation and interpretation.

2009-11-13 Thread Jason Dusek
I'm binding to `wcwidth` to determine the column widths of various Unicode characters. I noticed a lot of -- in fact all -- Chinese characters were being given widths of `-1` when of course they should have width `2`. This only showed up when I compiled my program though -- within GHCi,

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Niklas Broberg
Surely you do want this. It's the biggest problem with the original haskell-src package, that it cannot print out any useful Haskell code obtained from the parser, because it forgets all the brackets. I should point out that haskell-src-exts already fixes this for code obtained from the

[Haskell-cafe] ANN: wxHaskell 0.12.1.2

2009-11-13 Thread Jeremy O'Donoghue
Hi all, On behalf of the wxHaskell maintainers, I am very pleased to announce the release of wxHaskell 0.12.1.2. The key feature of this release is that it is now possible to install wxHaskell entirely using cabal on all targets (with a minor proviso on Windows). The credit for this achievement

Re: [Haskell-cafe] FFI binding -- different behaviour under compilation and interpretation.

2009-11-13 Thread Daniel Fischer
Am Samstag 14 November 2009 00:00:36 schrieb Jason Dusek: I'm binding to `wcwidth` to determine the column widths of various Unicode characters. I noticed a lot of -- in fact all -- Chinese characters were being given widths of `-1` when of course they should have width `2`. This only

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 23:54 +0100, Niklas Broberg wrote: Surely you do want this. It's the biggest problem with the original haskell-src package, that it cannot print out any useful Haskell code obtained from the parser, because it forgets all the brackets. I should point out that

Re: [Haskell-cafe] A small (?) problem with type families

2009-11-13 Thread Edward Kmett
On Fri, Nov 13, 2009 at 3:36 PM, David Menendez d...@zednenem.com wrote: On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote: First a type family where the type Y is functionally dependent on the type X, and we have a function from Y to (). class X a where type

Re: [Haskell-cafe] FFI binding -- different behaviour under compilation and interpretation.

2009-11-13 Thread Jason Dusek
Thank you very much! -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread wren ng thornton
Magicloud Magiclouds wrote: Hum... simple like that. So you meant the Monoid just abstracts/represents the ability to build a stack, right? The key idea behind monoids is that they define sequence. To get a handle on what that means, it helps to think first about the free monoid. If we have

Re: [Haskell-cafe] Problem with JHC

2009-11-13 Thread Philippos Apolinarius
I will wait for your fixing the problem. I am sure that JHC will work flawlessly sooner or later, and I intend to use it in my projects. --- On Fri, 11/13/09, John Meacham j...@repetae.net wrote: From: John Meacham j...@repetae.net Subject: Re: [Haskell-cafe] Problem with JHC To:

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread wren ng thornton
Stephen Tetley wrote: Hi Edward Many thanks. I've mostly used groupoid for 'string concatenation' on types that I don't consider to have useful empty (e.g PostScript paths, bars of music...), as string concatenation is associative it would have been better if I'd used semigroup in the first

Re: [Haskell-cafe] looking for a good algorithm

2009-11-13 Thread Hong Yang
Hi Casey, Thanks very much for your zeal. The table is a csv file. Actually the number of rows can be sixty thousand. Hong On Fri, Nov 13, 2009 at 5:08 PM, Casey Hawthorne cas...@istar.ca wrote: Sorry, I forgot to ask an important question. Is the table stored in a dense format as in

Re: [Haskell-cafe] Opinion about JHC

2009-11-13 Thread John Meacham
On Fri, Nov 13, 2009 at 08:55:51PM +, Lennart Augustsson wrote: That was indeed my point. Since a compiler is a substantial program I would have more confidence it a compiler that is self-hosting. Surely you must have tried? No, there are extensions that I use in jhc's code base that jhc

Re: [Haskell-cafe] FFI binding -- different behaviour under compilation and interpretation.

2009-11-13 Thread Jason Dusek
There is a Cabal package for this already: http://hackage.haskell.org/package/setlocale A call to `setLocale LC_ALL (Just )` in `main` fixes things. -- Jason Dusek 2009/11/13 Daniel Fischer daniel.is.fisc...@web.de: Am Samstag 14 November 2009 00:00:36 schrieb Jason Dusek:   I'm

[Haskell-cafe] Re: Opinion about JHC

2009-11-13 Thread Braden Shepherdson
John Meacham wrote: On Thu, Nov 12, 2009 at 10:44:22PM -0500, Braden Shepherdson wrote: The only annoying part was having to build with jhc outside the scratchbox environment and then build the C output inside the scratchbox. This is necessary because jhc is not self-hosting and I couldn't

[Haskell-cafe] Haskell Weekly News: Issue 139 - November 14, 2009

2009-11-13 Thread jfredett
--- Haskell Weekly News http://sequence.complete.org/hwn/20091114 Issue 139 - November 14, 2009 --- Welcome to issue 139 of HWN, a newsletter covering

[Haskell-cafe] Re: Opinion about JHC

2009-11-13 Thread Gour
On Fri, 13 Nov 2009 03:19:22 -0800 John == John Meacham j...@repetae.net wrote: John Would you really want to have to run jhc _on_ your nokia 770 (or John whatever) just to compile Haskell programs for it? No. I'd be satisfied with the ability to develop in Haskell for Maemo/Moblin and run

Re: [Haskell-cafe] Package Woes

2009-11-13 Thread Lemmih
On Fri, Nov 13, 2009 at 7:37 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Am Freitag 13 November 2009 18:58:22 schrieb Lemmih: We no longer use libffi and I've removed the dependency. However, you're most likely to hit further obstacles when it comes to building the base libraries for

[Haskell-cafe] Collection of sets containing no sets which are a subset of another in the collection

2009-11-13 Thread Mark Wassell
Hi, I am looking for a data structure that will represent a collection of sets such that no element in the collection is a subset of another set. In other words, inserting an element that is already a subset of another element will return the original collection, and inserting an element