Re: [Haskell-cafe] Software patents covered in GHC?

2011-06-21 Thread Erik de Castro Lopo
Manuel M T Chakravarty wrote: In fact, you are better of not to know. Given that GHC (like all non-trivial software) surely infringes on some patents, the damages that a patent holder can sue you for are less if you do not know about the patents you are infringing on. IIRC, a plaintiff can

[Haskell-cafe] GHC multicore Haskell multicore synchronization (was Re: Weird multi-threading runtime behaviour of single-threaded program with GHC-7.0.3)

2011-06-21 Thread Herbert Valerio Riedel
Hello Simon, On Fri, 2011-06-17 at 09:05 +0100, Simon Marlow wrote: What's happening there? The actual processing work seems to be done in a single HEC... but what are the remaining 11 HECs doing exactly? Am I doing something wrong? The answer is, they're all doing GC. When you say -N,

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Richard Senington
On 20/06/11 16:37, David Barbour wrote: On Mon, Jun 20, 2011 at 7:45 AM, Richard Senington sc06...@leeds.ac.uk mailto:sc06...@leeds.ac.uk wrote: I have recently become interested in Dataflow programming and how it related to functional languages. I am wondering if the community has

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

2011-06-21 Thread Uli Kastlunger
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 Compiler has been generated out of a specification in Coq [0]. Furthermore it is often stated, that it is

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread David Virebayre
2011/5/2 Bryan O'Sullivan b...@serpentine.com: Hi, folks - Over the past few days, I've released two MySQL-related packages on Hackage that I think should be pretty useful. The first is mysql-simple: http://hackage.haskell.org/package/mysql-simple This is a mid-level binding to the MySQL

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread cheater cheater
Hi, does the package adhere to some form of standard API that works the same way across other similar packages (different mysql drivers, postgres, mongo, couch, etc)? Is there such a standard for haskell? D. On Tue, Jun 21, 2011 at 13:45, David Virebayre dav.vire+hask...@gmail.com wrote:

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Johan Tibell
On Tue, Jun 21, 2011 at 2:34 PM, cheater cheater cheate...@gmail.com wrote: Hi, does the package adhere to some form of standard API that works the same way across other similar packages (different mysql drivers, postgres, mongo, couch, etc)? Is there such a standard for haskell? Not at the

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Heinrich Apfelmus
Richard Senington wrote: I have been looking through the papers by Conal Elliott and Paul Hudak, Hudak's book The Haskell School of Expression (chapters 13,15,17) and the latest version of the Reactive library on Hackage. In the past I have looked at Arrows, but I think I should have another

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 13:45, David Virebayre dav.vire+hask...@gmail.com wrote: The very first example didn't work for me : {-# LANGUAGE OverloadedStrings #-} import Database.MySQL.Simple hello = do conn - connect defaultConnectInfo query conn select 2 + 2 Yeah,

Re: [Haskell-cafe] [web-devel] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 15:28, Johan Tibell johan.tib...@gmail.com wrote: On Tue, Jun 21, 2011 at 2:34 PM, cheater cheater cheate...@gmail.com wrote: Is there such a standard for haskell? Not at the moment. I believe Bryan has at least talked with one other author (of a PostreSQL binding) about

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread David Virebayre
You can access the docs on a slightly earlier version: http://hackage.haskell.org/package/mysql-simple-0.2.2.0 That's what I did. The doc specifies it here: convertError :: [Field] - [Maybe ByteString] - Int - a Throw a ConversionFailed exception, indicating a mismatch between the number

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 16:47, David Virebayre dav.vire+hask...@gmail.com wrote: For example, how to write a function that returns the columns of a table using show columns ? type Champ = (String,String,String,String,String,String) getColumns :: Connection - String - IO [Champ] getColumns conn table

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Christopher Done
On 21 June 2011 16:54, Christopher Done chrisd...@googlemail.com wrote: query conn SHOW COLUMNS FROM ? (Only mytable) (With OverloadedStrings enabled.) Woops, that would need a type annotation. (Only (mytable :: Entity)) ___ Haskell-Cafe mailing

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Johan Tibell
On Tue, Jun 21, 2011 at 4:47 PM, David Virebayre dav.vire+hask...@gmail.com wrote: The problem isn't with the stored procedure, it works if I call it from the mysql client. Does mysql-simple support stored procedures? Johan ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread David Barbour
On Tue, Jun 21, 2011 at 3:18 AM, Richard Senington sc06...@leeds.ac.ukwrote: I have been looking through the papers by Conal Elliott and Paul Hudak, Hudak's book The Haskell School of Expression (chapters 13,15,17) and the latest version of the Reactive library on Hackage. In the past I

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Edward Kmett
The essence of data flow programming describes how you can use comonads to model the semantics of dataflow languages. One of the best stops from there is probably, Dave Menendez's response on the Haskell mailing list back in 2005 summarized how one can move from building a semantics for dataflow

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 4:45 AM, David Virebayre dav.vire+hask...@gmail.com wrote: I had trouble accessing the documentation : the last versions on hackage have a build failure, so the doc isn't available. I don't understand why that build failure occurs. You can always build documentation

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 7:47 AM, David Virebayre dav.vire+hask...@gmail.com wrote: The problem isn't with the stored procedure, it works if I call it from the mysql client. Right - as I mentioned in my previous note, the problem is that stored procedures and multi-statement queries can both

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

2011-06-21 Thread Alexander Solla
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 particular a verified C Compiler has been generated

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

2011-06-21 Thread Jason Dagit
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 particular a verified C Compiler has been generated

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

2011-06-21 Thread Elliot Stern
A tuple is basically an anonymous product type. It's convenient to not have to spend the time making a named product type, because product types are so obviously useful. Is there any reason why Haskell doesn't have anonymous sum types? If there isn't some theoretical problem, is there any

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

2011-06-21 Thread Malcolm Wallace
On 21 Jun 2011, at 20:53, Elliot Stern wrote: A tuple is basically an anonymous product type. It's convenient to not have to spend the time making a named product type, because product types are so obviously useful. Is there any reason why Haskell doesn't have anonymous sum types? If

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

2011-06-21 Thread Alexander Solla
On Tue, Jun 21, 2011 at 12:53 PM, Elliot Stern eliyahu.ben.mi...@gmail.comwrote: A tuple is basically an anonymous product type. It's convenient to not have to spend the time making a named product type, because product types are so obviously useful. Tuples are not so anonymous. Although

Re: [Haskell-cafe] [Haskell-beginners] boomBangs xs = [ if x 10 then BOOM! else BANG! | x - xs, odd x]

2011-06-21 Thread Jack Henahan
Hi Anthony. What you've got there is a list comprehension. I'll try to break down what it says for you. The basic structure of a list comprehension is function arguments = [ description of the list ] In this function, the argument 'xs' is a Haskell idiom. We use 'xs' to mean a list of x's.

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

2011-06-21 Thread pipoca
On Jun 21, 4:15 pm, Alexander Solla alex.so...@gmail.com wrote: The problem is that a sum type must name the different types, or else it can't give access to them.  How is a function supposed to know if a value blah :: A :+: B is an A or a B?  It seems possible that it could figure it out,

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

2011-06-21 Thread Matthew Steele
On Jun 21, 2011, at 4:02 PM, Malcolm Wallace wrote: On 21 Jun 2011, at 20:53, Elliot Stern wrote: A tuple is basically an anonymous product type. It's convenient to not have to spend the time making a named product type, because product types are so obviously useful. Is there any reason

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

2011-06-21 Thread Alexey Khudyakov
On 22.06.2011 00:32, pipoca wrote: On Jun 21, 4:15 pm, Alexander Sollaalex.so...@gmail.com wrote: The problem is that a sum type must name the different types, or else it can't give access to them. How is a function supposed to know if a value blah :: A :+: B is an A or a B? It seems

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

2011-06-21 Thread pipoca
On Jun 21, 4:57 pm, Alexey Khudyakov alexey.sklad...@gmail.com wrote: Types may be same. oops :: Int :+: Int - Int oops Int i = mmm which one? If you were to have your anonymous sum types be a union instead of the disjoint union, then you could say that A :+: A has no meaning. That's what I

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

2011-06-21 Thread Mike Erickson
On Tue, Jun 21, 2011 at 1:36 PM, Matthew Steele mdste...@alum.mit.eduwrote: On Jun 21, 2011, at 4:02 PM, Malcolm Wallace wrote: On 21 Jun 2011, at 20:53, Elliot Stern wrote: A tuple is basically an anonymous product type. It's convenient to not have to spend the time making a named

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

2011-06-21 Thread Antoine Latter
On Tue, Jun 21, 2011 at 3:36 PM, Matthew Steele mdste...@alum.mit.edu wrote: On Jun 21, 2011, at 4:02 PM, Malcolm Wallace wrote: On 21 Jun 2011, at 20:53, Elliot Stern wrote: A tuple is basically an anonymous product type.  It's convenient to not have to spend the time making a named product

Re: [Haskell-cafe] Choice of Linux distro redux

2011-06-21 Thread John Wagner
Friends: When you say that support for GHCi is in general best among the Linux distros (unordered) Gentoo, Arch, Fedora and Debian (I think Testing), is Ubuntu to be inferred from Debian, or is there some scandalous and well-known to all (but me) malady that lingers around the bellies of Ubuntu

Re: [Haskell-cafe] Choice of Linux distro redux

2011-06-21 Thread Brandon Allbery
On Tue, Jun 21, 2011 at 18:26, John Wagner gnuj...@gmail.com wrote: When you say that support for GHCi is in general best among the Linux distros (unordered) Gentoo, Arch, Fedora and Debian (I think Testing), is Ubuntu to be inferred from Debian, or is The former; for most purposes Ubuntu

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

2011-06-21 Thread Casey McCann
On Tue, Jun 21, 2011 at 5:24 PM, pipoca eliyahu.ben.mi...@gmail.com wrote: If you were to have your anonymous sum types be a union instead of the disjoint union, then you could say that A :+: A has no meaning. That's what I was originally thinking of when I suggested that syntax.  However, as

Re: [Haskell-cafe] Choice of Linux distro redux

2011-06-21 Thread Ivan Lazar Miljenovic
On 22 June 2011 08:34, Brandon Allbery allber...@gmail.com wrote: On Tue, Jun 21, 2011 at 18:26, John Wagner gnuj...@gmail.com wrote: When you say that support for GHCi is in general best among the Linux distros (unordered) Gentoo, Arch, Fedora and Debian (I think Testing), is Ubuntu to be

Re: [Haskell-cafe] Best Linux Distro for =

2011-06-21 Thread Nicholas Tung
On Sat, Jun 18, 2011 at 8:59 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 19 June 2011 13:48, Tom Murphy amin...@gmail.com wrote: Hi List, If my choice of Lunix distro depended 100% on its solidness as a Haskell devel platform (I am), what would you all recommend? In

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

2011-06-21 Thread David Barbour
On Tue, Jun 21, 2011 at 1:36 PM, Matthew Steele mdste...@alum.mit.eduwrote: Yes, Either is to sum types what (,) is to product types. The difference is that there is no anonymous sum type equivalent to (,,) and (,,,) and () and so on, which I think is what the original question is getting

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

2011-06-21 Thread John Ky
Hi all, Lately I've been finding the Network module missing from the docs I download from the GHC website, which brings me to the question: Is there any way I could generate libraries for this, the core libraries and all installed cabal packages into one reference so I can work offline? Cheers,

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

2011-06-21 Thread David Barbour
On Tue, Jun 21, 2011 at 2:24 PM, pipoca eliyahu.ben.mi...@gmail.com wrote: On Jun 21, 4:57 pm, Alexey Khudyakov alexey.sklad...@gmail.com wrote: Types may be same. oops :: Int :+: Int - Int oops Int i = mmm which one? If you were to have your anonymous sum types be a union instead of

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

2011-06-21 Thread Arlen Cuss
import Data.Either type (:|:) a b = Either a b (???) = either foo :: (Int :|: Bool :|: String :|: Double) - Int foo = \ i - i + 7 ??? \ b - if b then 1 else 0 ??? \ s - length s ??? \ d - floor d INFIX TYPE OPERATORS!!??!

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

2011-06-21 Thread John Ky
Hi Svein, Where can I find this file on Windows 7 or Windows generally if its all the same? Cheers, -John On 22 June 2011 10:15, Svein Ove Aas sve...@gmail.com wrote: Yes, cabal does this if you have haddock installed. You'll probably have to edit .cabal/config, though. The relevant

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

2011-06-21 Thread Jack Henahan
John, Run `ghci`, then :m System.Directory getAppUserDataDirectory cabal That'll show you the directory where your cabal config is. On Jun 21, 2011, at 9:03 PM, John Ky wrote: Hi Svein, Where can I find this file on Windows 7 or Windows generally if its all the same? Cheers,

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

2011-06-21 Thread wren ng thornton
On 6/21/11 6:54 PM, Casey McCann wrote: That said, I don't think either retains the tidy algebraic properties that disjoint unions and tuples have, so I'm not sure if calling them sums and products is actually correct. I don't think there are any problems[1]. Categorically speaking, a product

[Haskell-cafe] yi + cabal-dev

2011-06-21 Thread Alex Rozenshteyn
I'm trying to run yi. 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 pointed to a separate package database. Has anyone gotten a

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

2011-06-21 Thread Reiner Pope
I've not tried this myself, but you could look at the -fhacking flag. It's documented in the README.md file, which claims it compiles yi without dynamic reconfiguration, and instead uses HackerMain.hs as your (static) configuration file. Reiner On 22/06/11 11:55, Alex Rozenshteyn wrote: I'm

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread David Menendez
On Tue, Jun 21, 2011 at 12:14 PM, Edward Kmett ekm...@gmail.com wrote: The essence of data flow programming describes how you can use comonads to model the semantics of dataflow languages. One of the best stops from there is probably, Dave Menendez's response on the Haskell mailing list back

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

2011-06-21 Thread Casey McCann
On Tue, Jun 21, 2011 at 9:51 PM, wren ng thornton w...@freegeek.org wrote: I don't think there are any problems[1]. (...) [1] modulo the A:+:A ~ A issue. That issue is exactly my concern, though, and it seems a bit too thorny to handwave aside. For instance, doesn't this also cause problems for

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Mario Blažević
On 11-06-20 10:45 AM, Richard Senington wrote: Hi all, I have recently become interested in Dataflow programming and how it related to functional languages. I am wondering if the community has any advice on reading matter or other directions to look at. So far I have been looking through

[Haskell-cafe] Category theory as a design tool

2011-06-21 Thread Arnaud Bailly
Hello, I ha ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-06-21 Thread Daniel Peebles
Hey, I think you forgo On Wed, Jun 22, 2011 at 12:20 AM, Arnaud Bailly arnaud.oq...@gmail.comwrote: Hello, I ha ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Category theory as a design tool

2011-06-21 Thread Arnaud Bailly
(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 haskell and scala in my spare time and assuming the frustration of

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

2011-06-21 Thread Arlen Cuss
On 22/06/2011 2:24 PM, Daniel Peebles wrote: Hey, I think you forgo Hahah, this reminds me of the time I onc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-06-21 Thread Alex Rozenshteyn
Funny, I didn't hear anyone say Candlejack. What abou ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-06-21 Thread MigMit
I remember myself complaining about how when one says something stupid and corrects himself in a few minutes, it's the first message that attracts all the attention, not the second one. Отправлено с iPhone Jun 22, 2011, в 8:42, Alex Rozenshteyn rpglove...@gmail.com написал(а): Funny, I

Re: [Haskell-cafe] Using cmake with haskell

2011-06-21 Thread Evan Laforge
On Sun, May 15, 2011 at 8:21 AM, Malcolm Wallace malcolm.wall...@me.com wrote: On 5/14/11 6:12 PM, Nathan Howell wrote: Waf supports parallel builds and works with GHC without too much trouble. I'm surprised no-one has yet mentioned Shake, a build tool/library written in Haskell.  It does

[Haskell-cafe] Alex Lexer Performance Issues

2011-06-21 Thread Tristan Ravitch
Hi Cafe, In one of my projects I have a lexer that seems to be taking an inordinate amount of time and space. The lexer is generated by Alex using the lazy ByteString (with position information) template. I compiled and ran with profiling enabled and I get a report like this: