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 wrote: > 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 > and adjunctions

[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 def

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 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 altogether > to g

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 thornton 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 w

[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 7.

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 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 publicised in beginner texts)

Re: [Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Ivan Lazar Miljenovic
On 23 June 2011 02:48, Stephen Tetley 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 than String (thus impro

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 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 the

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

2011-06-22 Thread Brett Giles
___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe >> > -- next part -- > An HTML attachment was scrubbed... > URL: > <http://www.h

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 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)? You probably want

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 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 categorical

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 l

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 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 f foobaz > h

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

2011-06-22 Thread Vo Minh Thu
2011/6/22 Gregory Collins : > On Wed, Jun 22, 2011 at 4:39 PM, SM Design 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. B

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

2011-06-22 Thread Johan Tibell
On Wed, Jun 22, 2011 at 10:39 PM, SM Design 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 ___ Haskell-Cafe mailing

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

2011-06-22 Thread Gregory Collins
On Wed, Jun 22, 2011 at 4:39 PM, SM Design 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 get help, you sho

[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 act

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" 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 disting

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 qui

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 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 dabbling > with ha

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 "fr

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 wrote: > 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, al

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 thornton 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 too > thor

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 wrote: > > See the graphviz package: http://hackage.haskell.org/package/graphviz ___ Haskell-Cafe mailing list Haskell-Cafe@haske

Re: [Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Vo Minh Thu
2011/6/22 Dmitri O.Kondratiev : > 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 list 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

[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] 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

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 ** 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 install --reinstall

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] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-22 Thread Uli Kastlunger
2011/6/21 Jason Dagit > On Tue, Jun 21, 2011 at 3:31 AM, Uli Kastlunger > 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 > > particular a verified C Compi

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 c The module Text.XML.HaXml.OneOfN defines these types up to size 20.The package HaXml also comes with a small command-line dr

[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 To: Steffen Schuldenzucker Cabal fails with a timeout like this: stuart@Panforte:~/Code/gift-parser# caba

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 IP address of hackage.haskell.org

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 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 hackage.haskell.org is 69.30.6

[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 ma

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 differe

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

2011-06-22 Thread Rogan Creswick
On Tue, Jun 21, 2011 at 11:59 PM, Alex Rozenshteyn 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 'ghc' shell script tha

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 : > I remember myself complaining about how wh

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 wrote: > On 22 June 2011 05:30, Arnaud Bailly wrote: > >> Are

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 atte

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 wrote: > On Tue, Jun 21, 2011 at 6:55 PM, Alex Rozenshteyn > wro