Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Sebastien Zany
Hi Arnaud, I'm not the best person to answer this question, and I'm not certain this constitutes an answer, but you might be interested in Conal Elliott's paper Denotational design with type class morphisms available at http://conal.net/papers/type-class-morphisms/. Sebastien On Tue, Jun 21,

Re: [Haskell-cafe] yi + cabal-dev

2011-06-22 Thread Rogan Creswick
On Tue, Jun 21, 2011 at 6:55 PM, Alex Rozenshteyn rpglove...@gmail.com wrote: More precisely, I'm trying to run yi in its own sandbox, created by cabal-dev. yi uses dyre to recompile its config file. Unsurprisingly, this fails, since ghc doesn't know anything about the yi install unless

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Stephen Tetley
On 22 June 2011 05:30, Arnaud Bailly arnaud.oq...@gmail.com wrote: Are there works/thesis/books/articles/blogs that try to use Cat. theory explicitly as a tool/language for designing software (not as an underlying formalisation or semantics)? Is the question even meaningful? You might find

Re: [Haskell-cafe] Alex Lexer Performance Issues

2011-06-22 Thread Stephen Tetley
How fast is good old String rather than ByteString? For lexing, String is a good fit (cheap deconstruction at the head / front). For your particular case, maybe it loses due to the large file size, maybe it doesn't... ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] yi + cabal-dev

2011-06-22 Thread Alex Rozenshteyn
From looking at Yi's code, there seems to be a hard-coded list of arguments to pass to ghc. A hack would be to recompile Yi with the arguments to use a different package database... On Wed, Jun 22, 2011 at 2:32 AM, Rogan Creswick cresw...@gmail.com wrote: On Tue, Jun 21, 2011 at 6:55 PM, Alex

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
Thanks Sebastien, This paper has passed in my radar's field but I must confess that although I think I grasped the idea, I was quickly lost in the profusion of symbols and notations. I am no mathematician, only a simple developer, although I am fascinated by several topics in mathematics so my

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
Thanks Stephen, looks interesting and congruent with few a priori I had in mind. I have already seen in prior life connections between modeling, MOF and category theory. Regards Arnaud On Wed, Jun 22, 2011 at 8:38 AM, Stephen Tetley stephen.tet...@gmail.com wrote: On 22 June 2011 05:30, Arnaud

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
We have a saying in french for that which translates approximately to turn your tongue seven times in your mouth before speaking. That's what happen when one tries to type mails and have breakfast at the same time :-) Cheers Arnaud 2011/6/22 MigMit miguelim...@yandex.ru: I remember myself

Re: [Haskell-cafe] yi + cabal-dev

2011-06-22 Thread Rogan Creswick
On Tue, Jun 21, 2011 at 11:59 PM, Alex Rozenshteyn rpglove...@gmail.com wrote: From looking at Yi's code, there seems to be a hard-coded list of arguments to pass to ghc. A hack would be to recompile Yi with the arguments to use a different package database... You may be able to create a

Re: [Haskell-cafe] yi + cabal-dev

2011-06-22 Thread Alex Rozenshteyn
Experimentation with that idea and the use of the strings command suggest that the full path to the ghc binary is used and is stored in the compiled Yi executable. I'd rather not replace the ghc binary with a shell script that determines if it's being called by Yi or not and then behaves

[Haskell-cafe] Hackage Server not reachable

2011-06-22 Thread Stuart Coyle
I cannot reach the hackage server so cabal can't download packages. Have I the correct address? http://hackage.haskell.org stuart@rumbaba:~# resolveip hackage.haskell.org IP address of hackage.haskell.org is 69.30.63.204 I also cannot access any of the Hackage web pages. I suspect that my ISP

Re: [Haskell-cafe] Hackage Server not reachable

2011-06-22 Thread Johan Tibell
Hi Stuart, On Wed, Jun 22, 2011 at 11:02 AM, Stuart Coyle stuart.co...@gmail.com wrote: I cannot reach the hackage server so cabal can't download packages. Have I the correct address? http://hackage.haskell.org Yes. stuart@rumbaba:~# resolveip hackage.haskell.org IP address of

Re: [Haskell-cafe] Hackage Server not reachable

2011-06-22 Thread Steffen Schuldenzucker
On 06/22/2011 11:02 AM, Stuart Coyle wrote: I cannot reach the hackage server so cabal can't download packages. Have I the correct address? http://hackage.haskell.org Yes. stuart@rumbaba:~# resolveip hackage.haskell.org http://hackage.haskell.org IP address of hackage.haskell.org

[Haskell-cafe] Fwd: Re: Hackage Server not reachable

2011-06-22 Thread Steffen Schuldenzucker
Forwarding to -cafe. Original Message Subject:Re: [Haskell-cafe] Hackage Server not reachable Date: Wed, 22 Jun 2011 20:43:59 +1000 From: Stuart Coyle stuart.co...@gmail.com To: Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de Cabal fails with a timeout

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread malcolm.wallace
Why not just do what we do for tuples? Define a bunch of generic types up front: data Choice2 a b = OneOf2 a | TwoOf2 b data Choice3 a b c = OneOf3 a | TwoOf3 b | ThreeOf3 cThe module Text.XML.HaXml.OneOfN defines these types up to size 20.The package HaXml also comes with a small command-line

Re: [Haskell-cafe] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-22 Thread Uli Kastlunger
2011/6/21 Jason Dagit dag...@gmail.com On Tue, Jun 21, 2011 at 3:31 AM, Uli Kastlunger squar...@gmail.com wrote: Hello Haskell fellows, recently there has been a huge progress in generating real programs by specifying them in interactive theorems prover like Isabelle or Coq, in

Re: [Haskell-cafe] PhD studentship in Functional Programming

2011-06-22 Thread Graham Hutton
Dear all, Just a quick reminder that the deadline for receiving applications for this PhD studentship position is this Friday (24th June.) Best wishes, Graham +--+ PhD Studentship in Functional Programming

Re: [Haskell-cafe] Getting library documentation for installed packages on Windows

2011-06-22 Thread John Ky
Thanks Jack, I can get the documentation okay with: cabal install --reinstall *package-name* Now I'm getting into another problem. I specifically wanted the documentation for the Network module as its documentation is not included in the default Haskell Platform install. I run: cabal

Re: [Haskell-cafe] Alex Lexer Performance Issues

2011-06-22 Thread Tristan Ravitch
On Wed, Jun 22, 2011 at 07:48:40AM +0100, Stephen Tetley wrote: How fast is good old String rather than ByteString? For lexing, String is a good fit (cheap deconstruction at the head / front). For your particular case, maybe it loses due to the large file size, maybe it doesn't... I gave it

[Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Dmitri O.Kondratiev
Hi, I am looking for Haskell library to create graph diagrams in png or similar formats. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-22 Thread Dominic Mulligan
I'm no expert with compcert, but as I understand it their approach is to only do semantic preserving changes to the program at each step in the translation from C source to binary. I'm not sure what they used as their specification of C and it seems like the correctness of their approach would

Re: [Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Vo Minh Thu
2011/6/22 Dmitri O.Kondratiev doko...@gmail.com: Hi, I am looking for Haskell library to create graph diagrams in png or similar formats. See the graphviz package: http://hackage.haskell.org/package/graphviz Cheers, Thu ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Stephen Tetley
Or Andy Gill's Dotgen - simple and stable: http://hackage.haskell.org/package/dotgen On 22 June 2011 16:16, Vo Minh Thu not...@gmail.com wrote: See the graphviz package: http://hackage.haskell.org/package/graphviz ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread wren ng thornton
On 6/21/11 10:48 PM, Casey McCann wrote: On Tue, Jun 21, 2011 at 9:51 PM, wren ng thorntonw...@freegeek.org wrote: I don't think there are any problems[1]. (...) [1] modulo the A:+:A ~ A issue. Oops, I should've said A:*:A there. That issue is exactly my concern, though, and it seems a bit

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 12:06 AM, Arnaud Bailly arnaud.oq...@gmail.comwrote: Thanks Sebastien, This paper has passed in my radar's field but I must confess that although I think I grasped the idea, I was quickly lost in the profusion of symbols and notations. I am no mathematician, only a

Re: [Haskell-cafe] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 8:11 AM, Dominic Mulligan dominic.p.mulli...@googlemail.com wrote: There's a second (haha) approach, which I use basically every day. Use the typing language fragment from a strongly typed programming language to express a specification, and then rely on free

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Gregg Reynolds
On Tue, Jun 21, 2011 at 11:30 PM, Arnaud Bailly arnaud.oq...@gmail.com wrote: (2nd try, took my gloves off...) Hello Café, I have been fascinated by Cat. theory for quite a few years now, as most people who get close to it I think. I am a developer, working mostly in Java for my living and

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
Hello Greg and Alexander, Thanks for your replies. Funnily, I happen to own the 3 books you mentionned :-) My interest in category theory is a long standing affair... Note that owning a book, having read (most of) it and knowing a theory (or at least its principles and main concepts) is really

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread pipoca
On Jun 22, 2:19 pm, wren ng thornton w...@freegeek.org wrote: In contrast, ordered pairs and disjoint unions are tidy, simple, and obvious. Disjoint pairs are sufficient; they needn't be ordered. All we need is that they are tagged in the same way that disjoint unions are, so that we can

[Haskell-cafe] Homework help - calculator function

2011-06-22 Thread SM Design
I have a homework which is very important to be done but I can't complete the task at all. The program i should write is: Make calculator- function in Haskell. The function argument is a list of strings and also form such list, as each string of the argument made definite

Re: [Haskell-cafe] Homework help - calculator function

2011-06-22 Thread Gregory Collins
On Wed, Jun 22, 2011 at 4:39 PM, SM Design social_me...@abv.bg wrote:  I have a homework which is very important to be done but I can't complete the task at all. The program i should write is: Nobody on this list is going to do your homework for you, or at least I hope not. Before you expect to

Re: [Haskell-cafe] Homework help - calculator function

2011-06-22 Thread Johan Tibell
On Wed, Jun 22, 2011 at 10:39 PM, SM Design social_me...@abv.bg wrote:  I have a homework which is very important to be done but I can't complete the task at all. The program i should write is: http://www.haskell.org/haskellwiki/Homework_help ___

Re: [Haskell-cafe] Homework help - calculator function

2011-06-22 Thread Vo Minh Thu
2011/6/22 Gregory Collins g...@gregorycollins.net: On Wed, Jun 22, 2011 at 4:39 PM, SM Design social_me...@abv.bg wrote:  I have a homework which is very important to be done but I can't complete the task at all. The program i should write is: Nobody on this list is going to do your homework

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 1:25 PM, pipoca eliyahu.ben.mi...@gmail.com wrote: Also, I don't think that the formulation of (:|:) above is sufficient. Suppose: foo :: Foo - Bar baz :: Baz - Quux foobaz :: [Foo :|: Baz] -- map foo and baz over foobaz barquux :: [Bar :|: Quux] barquux = map

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread wren ng thornton
On 6/22/11 3:59 PM, Arnaud Bailly wrote: Hello Greg and Alexander, Thanks for your replies. Funnily, I happen to own the 3 books you mentionned :-) My interest in category theory is a long standing affair... Note that owning a book, having read (most of) it and knowing a theory (or at least

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread Casey McCann
On Wed, Jun 22, 2011 at 2:19 PM, wren ng thornton w...@freegeek.org wrote: [1] modulo the A:+:A ~ A issue. Oops, I should've said A:*:A there. That issue is exactly my concern, though, and it seems a bit too thorny to handwave aside. Indeed. If we have A:*:A ~ A, then A:*:A is not a

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread Casey McCann
On Wed, Jun 22, 2011 at 5:00 PM, Alexander Solla alex.so...@gmail.com wrote: You're building up (Either a b) into a monoidal category.  There used to be a package called category-extras for this kind of stuff.  I think it has been broken up.  Does anybody know the status of its replacement(s)?

Re: [Haskell-cafe] category theory as a design tool

2011-06-22 Thread Brett Giles
-- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20110622/9f65e9e9/attachment-0001.htm -- Message: 15 Date: Wed, 22 Jun 2011 21:59:11 +0200 From: Arnaud Bailly arnaud.oq...@gmail.com Subject: Re

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Gregg Reynolds
On Wed, Jun 22, 2011 at 2:59 PM, Arnaud Bailly arnaud.oq...@gmail.comwrote: Hello Greg and Alexander, Thanks for your replies. Funnily, I happen to own the 3 books you mentionned :-) My interest in category theory is a long standing affair... Note that owning a book, having read (most of) it

Re: [Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Ivan Lazar Miljenovic
On 23 June 2011 02:48, Stephen Tetley stephen.tet...@gmail.com wrote: Or Andy Gill's Dotgen - simple and stable: http://hackage.haskell.org/package/dotgen Within the next month, I should hopefully finally finish the new version of graphviz. Various improvements include: * Using Text rather

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread David Barbour
On Wed, Jun 22, 2011 at 1:25 PM, pipoca eliyahu.ben.mi...@gmail.com wrote: Is there any reason why we don't have either anonymous disjoint union types, or why some of the proposals here (e.g. type (:|:) a b = Either a b ) haven't been implemented, or put into the standard libraries (and

[Haskell-cafe] Haskell Weekly News: Issue 187

2011-06-22 Thread Daniel Santa Cruz
Welcome to issue 187 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of June 12 to 18, 2011. Announcements Ian Lynagh announced a new patchlevel release of GHC (7.0.4). This release contains a handful of bugfixes relative to

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread wren ng thornton
On 6/22/11 6:00 PM, Casey McCann wrote: On Wed, Jun 22, 2011 at 2:19 PM, wren ng thorntonw...@freegeek.org wrote: [1] modulo the A:+:A ~ A issue. Oops, I should've said A:*:A there. That issue is exactly my concern, though, and it seems a bit too thorny to handwave aside. Indeed. If we

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
On Thu, Jun 23, 2011 at 2:03 AM, Gregg Reynolds d...@mobileink.com wrote: Well, you're way ahead of me. I don't even get adjunctions, to tell you the truth. By which I mean that I have no intuition about them; it's not so hard to understand the formal definition, but it's another thing

[Haskell-cafe] None brute-force BWT algorithm

2011-06-22 Thread larry.liuxinyu
Hi, I read a previous thread about BWT implementation in Haskell: http://www.mail-archive.com/haskell-cafe@haskell.org/msg25609.html and http://sambangu.blogspot.com/2007/01/burrows-wheeler-transform-in-haskell They are all in a `brute-force' way, that is implement based on Burrows-Wheeler's

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Arnaud Bailly
On Wed, Jun 22, 2011 at 11:46 PM, wren ng thornton w...@freegeek.orgwrote: One of the big benefits I see to using category theory for dealing with programming languages comes from using CT as a generalized logic for equational reasoning. In particular, making use of the ideas of (co)limits