Re: [Haskell-cafe] HDBC PostgreSQL

2009-10-10 Thread Ketil Malde
Patrick Brannan brannans...@gmail.com writes: Prelude :module Database.HDBC Database.HDBC.PostgreSQL module `Database.HDBC.PostgreSQL' is not loaded I wonder if I haven't seen this when I'm in the package's top directory, that is, the current directory contains Database/HDBC/PostgreSQL.hs

Re: [Haskell-cafe] Approaches to dependent types (DT)

2009-10-10 Thread Dan Doel
I'll see if I can't gloss over some of the stuff Ryan Ingram already covered. On Friday 09 October 2009 9:11:30 am pat browne wrote: 2) Types depending on types called parametric and type-indexed types The above distinction in types (and values) depending on types has to do with operations

[Haskell-cafe] Haskell Weekly News: Issue 134 - October 10, 2009

2009-10-10 Thread jfredett
--- Haskell Weekly News http://sequence.complete.org/hwn/20091010 Issue 134 - October 10, 2009 --- Welcome to issue 134 of HWN, a newsletter covering

[Haskell-cafe] Re: Applicative do?

2009-10-10 Thread oleg
It seems the applicative do is almost identical to the form ML and Scheme has had since the beginning. Perhaps that semantic similarity might inform the syntactic debate. do a - f g b - h pure $ foo a b into this: (\a b - pure $ foo a b) * (f * g * h) This form, although very

Re: [Haskell-cafe] Re: Applicative do?

2009-10-10 Thread Nicolas Pouillard
Excerpts from oleg's message of Sat Oct 10 11:36:44 +0200 2009: It seems the applicative do is almost identical to the form ML and Scheme has had since the beginning. Perhaps that semantic similarity might inform the syntactic debate. do a - f g b - h pure $ foo a b

[Haskell-cafe] What does mkUsageInfo: internal name? mean? (ghc 6.10.1, Template Haskell)

2009-10-10 Thread Serguey Zefirov
I get a bunch of messages like mkUsageInfo: internal name? WritebackCmd{tc a1eZY} while transforming my program using Template Haskell. It displayed for every data type and for every constructor - I generate some instances for my data types. ___

[Haskell-cafe] Ghci :ctags or hasktags print to standard out instead of file

2009-10-10 Thread Johannes
Hi, I want to use Vim with Haskell. Therefore ctags generation is really useful. The TagList plugin for Vim reads the ctags info from the command line instead of from the file. I could not figure out how to make ghci :ctags or hasktasks to print the ctags info to the command line. Is there a way

Re: [Haskell-cafe] HDBC PostgreSQL

2009-10-10 Thread Duncan Coutts
On Fri, 2009-10-09 at 14:56 -0500, Patrick Brannan wrote: Hello, I'm getting back into Haskell after an absence of a few years. I'm in the process of trying to connect to postgresql with hdbc-postgresql on a Windows XP box. Seemingly, things installed without a problem, but at the

Re: [Haskell-cafe] Happstack + network package issue on the Mac

2009-10-10 Thread Duncan Coutts
On Fri, 2009-10-09 at 12:22 -0700, Bryan O'Sullivan wrote: On Fri, Oct 9, 2009 at 7:25 AM, Gregory Collins g...@gregorycollins.net wrote: There's been an open ticket for months; personally I think this is a job for the C preprocessor, but nobody's written

Re: [Haskell-cafe] Ghci :ctags or hasktags print to standard out instead of file

2009-10-10 Thread Steffen Schuldenzucker
The TagList plugin for Vim reads the ctags info from the command line instead of from the file. I could not figure out how to make ghci :ctags or hasktasks to print the ctags info to the command line. Is there a way to do that? Any hints? Hmm... some shell magic: mkfifo foo cat foo echo

[Haskell-cafe] ANN: Extensions to Vec uploaded (useful for GPipe programs)

2009-10-10 Thread Tobias Bexelius
Hi, I've added two extensions to the Vec package: Vec-Transform and Vec-Boolean. These two packages are more or less essential when programming GPipe programs, but can also be useful for other applications as well. * Vec-Transform provides some 4x4 transform matrices such as perspective

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread Thomas Hartman
I don't know if this counts but how about import Control.Applicative import Control.Monad import Random import Data.List main'' i j = replicateM j $ maximum' $ (replicateM i . randomRIO $ (0,10^9)) maximum' = foldl1' max t = main'' (10^4) 5 2009/10/9 mf-hcafe-15c311...@etc-network.de: Hi

Re: [Haskell-cafe] How to add use custom preprocessor in cabal

2009-10-10 Thread Duncan Coutts
On Thu, 2009-10-08 at 17:28 +0200, Bernd Brassel wrote: Hi folks, I am trying to integrate my own preprocessor into a cabal build process. But there are several points that I get stuck with. Could someone help me, please? A simplification of my problem: I have files Abc.foo and each

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread Thomas Hartman
Yes, you should not do this in IO. That requires the entire computation to finish before the result can be used. Not really the entire computation though... whnf, no? main = do let thunks :: IO [Int] thunks = (sequence . replicate (10^6) $ (randomRIO (0,10^9))) putStrLn . show . head =

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread Thomas Hartman
also, looking at the following, it does seem to me that it is sequence that is too strict, and not IO that is to blame, as the Maybe monad has the same behavior: t5IO, t6IO :: IO Int t5Maybe, t6Maybe :: Maybe Int t5 = return . head = sequence [return 1, undefined] t6 = return . head = return

Re: [Haskell-cafe] HDBC PostgreSQL

2009-10-10 Thread Patrick Brannan
That did the trick. Everything works perfectly now. Thank you. On Sat, Oct 10, 2009 at 8:04 AM, Duncan Coutts duncan.cou...@googlemail.com wrote: On Fri, 2009-10-09 at 14:56 -0500, Patrick Brannan wrote: Hello, I'm getting back into Haskell after an absence of a few years. I'm in the process

Re: [Haskell-cafe] Re: Libraries for Commercial Users

2009-10-10 Thread John Melesky
On 2009-10-09, at 7:53 PM, John A. De Goes wrote: The vast majority of applications being built today are web apps. I'm not convinced this is the case. There are still a great many enterprise desktop apps and mobile apps being built, and the selection bias towards internet-based

[Haskell-cafe] Re: What *is* a DSL?

2009-10-10 Thread Ben Franksen
Robert Atkey wrote: A deep embedding of a parsing DSL (really a context-sensitive grammar DSL) would look something like the following. I think I saw something like this in the Agda2 code somewhere, but I stumbled across it when I was trying to work out what free applicative functors were.

[Haskell-cafe] Type-level naturals multiplication

2009-10-10 Thread Brad Larsen
Suppose we implement type-level naturals as so: data Zero data Succ a Then, we can reflect the type-level naturals into a GADT as so (not sure if ``reflect'' is the right terminology here): data Nat :: * - * where Zero :: Nat Zero Succ :: Nat a - Nat (Succ a) Using type families, we can

[Haskell-cafe] Haskell-tan competition

2009-10-10 Thread Svein Ove Aas
I say competition, but.. at the moment I'm only aware of a single Haskell-tan, namely the one at http://www.reddit.com/r/programming/comments/9ss7n/haskell%E3%82%BF%E3%83%B3_%E7%B5%B5/. This cannot stand. Haskell needs an anthropomorphized personification, like any other modern language. Anyway,

Re: [Haskell-cafe] Haskell-tan competition

2009-10-10 Thread Miguel Mitrofanov
Just a note: Haskell and 'tan' in one sentence, combined with some girlish flavour, makes me think about Audrey TANg. On 10 Oct 2009, at 23:02, Svein Ove Aas wrote: I say competition, but.. at the moment I'm only aware of a single Haskell-tan, namely the one at

[Haskell-cafe] STM in .NET

2009-10-10 Thread Andrew Coppin
Apparently they like what they see, and they want it to: http://kskky.info/wiki/STM.NETInFramework4 (I notice that it relies on the user manually annotating anything that isn't safe to revert... This makes me nervous.) ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread mf-hcafe-15c311f0c
On Fri, Oct 09, 2009 at 05:48:15PM -0600, Luke Palmer wrote: To: mf-hcafe-15c311...@etc-network.de Cc: From: Luke Palmer lrpal...@gmail.com Date: Fri, 9 Oct 2009 17:48:15 -0600 Subject: Re: [Haskell-cafe] How do I get this done in constant mem? On Fri, Oct 9, 2009 at 2:05 PM,

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread mf-hcafe-15c311f0c
On Sat, Oct 10, 2009 at 09:33:52AM -0700, Thomas Hartman wrote: To: Luke Palmer lrpal...@gmail.com Cc: mf-hcafe-15c311...@etc-network.de, haskell-cafe@haskell.org From: Thomas Hartman tphya...@gmail.com Date: Sat, 10 Oct 2009 09:33:52 -0700 Subject: Re: [Haskell-cafe] How do I get this done

Re: [Haskell-cafe] STM in .NET

2009-10-10 Thread Thomas DuBuisson
(I notice that it relies on the user manually annotating anything that isn't safe to revert... This makes me nervous.) So due to impurity everything that isn't explicitly annotated is implicitly 'unsafeIOToSTM'? ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] STM in .NET

2009-10-10 Thread Andrew Coppin
Thomas DuBuisson wrote: (I notice that it relies on the user manually annotating anything that isn't safe to revert... This makes me nervous.) So due to impurity everything that isn't explicitly annotated is implicitly 'unsafeIOToSTM'? It seems that instead of marking the handful of

Re: [Haskell-cafe] Re: Libraries for Commercial Users

2009-10-10 Thread Don Stewart
brad.larsen: John, On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes j...@n-brain.net wrote: [...] JVM is cross-platform, and contains sufficient typing information to permit one to write something like, import foreign jvm java.list.Collection, and have typed access to the whole class and

Re: [Haskell-cafe] How do I get this done in constant mem?

2009-10-10 Thread Daniel Fischer
Am Samstag 10 Oktober 2009 22:14:38 schrieb mf-hcafe-15c311...@etc-network.de: On Sat, Oct 10, 2009 at 09:33:52AM -0700, Thomas Hartman wrote: To: Luke Palmer lrpal...@gmail.com Cc: mf-hcafe-15c311...@etc-network.de, haskell-cafe@haskell.org From: Thomas Hartman tphya...@gmail.com Date:

Re: [Haskell-cafe] Re: Libraries for Commercial Users

2009-10-10 Thread Brad Larsen
On Sat, Oct 10, 2009 at 5:11 PM, Don Stewart d...@galois.com wrote: brad.larsen: John, On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes j...@n-brain.net wrote: [...] JVM is cross-platform, and contains sufficient typing information to permit one to write something like, import foreign jvm

Re: [Haskell-cafe] Re: Libraries for Commercial Users

2009-10-10 Thread Don Stewart
brad.larsen: On Sat, Oct 10, 2009 at 5:11 PM, Don Stewart d...@galois.com wrote: brad.larsen: John, On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes j...@n-brain.net wrote: [...] JVM is cross-platform, and contains sufficient typing information to permit one to write something

Re: [Haskell-cafe] Snow Leopard, gtk2hs

2009-10-10 Thread Judah Jacobson
On Tue, Oct 6, 2009 at 11:41 AM, Arne Dehli Halvorsen arne@gmail.com wrote: This may be a little off-topic, but if someone could help me, I'd be grateful. I am trying to get to a working gtk2hs environment in MacOSX Snow Leopard I have a Macbook Pro 2.1 with Snow Leopard. While I had