Re: [Haskell-cafe] Help converting Perl to Haskell

2008-10-22 Thread Jason Dagit
On Tue, Oct 21, 2008 at 9:33 PM, Duncan Coutts [EMAIL PROTECTED] wrote: On Tue, 2008-10-21 at 20:33 -0700, Jason Dagit wrote: Correct me if I'm wrong, but if I want to make this work on windows I can't use System.Posix, right? If so, what is the portable way to set environment variables? I

Re: [Haskell-cafe] Cabal warning

2008-10-22 Thread Peter Higley
I had the same problem on a Mac system, change GHC to ghc and things will work. I didn't even think that it was an actual bug! Ticket #379 reports the problem. On Tue, Oct 21, 2008 at 3:52 PM, Duncan Coutts [EMAIL PROTECTED]wrote: On Wed, 2008-10-22 at 00:05 +0200, Henk-Jan van Tuyl wrote:

Re: [Haskell-cafe] Spine-lazy multiqueue

2008-10-22 Thread Ryan Ingram
Here's an infinite structure with logarithmic access time with natural numbers for keys. It's not particularily efficient for a sparse map, but if the maximum used key is linear in the size of your problem, it gives log(n) access time. However, an infinite fold of insert is still _|_; you have

[Haskell-cafe] Re: Build without install, using cabal

2008-10-22 Thread Mauricio
I would like to include a few source files as 'executable' sections in a .cabal package description. However, although I do want to use main=mainDefault features, I do not want those packages to be installed when I run 'Setup.hs install'. Yes, just use this in the executable section:

[Haskell-cafe] labels in HList

2008-10-22 Thread roger peppe
hi, i'm trying to get labelled records working with the current version of HList. i've got code that looks like: {-# language EmptyDataDecls #-} module Tst where import Data.HList data Foo;foo = proxy::Proxy Foo data Bar; bar= proxy::Proxy Bar rec1 =

[Haskell-cafe] Re: A heretic question

2008-10-22 Thread Mauricio
At first, make sure you have Bjarne Stroustrup book (very important: last edition). If there's anything good in C++, it's there. Look also at his homepage: http://www.research.att.com/~bs/homepage.html I got the third edition and read it a couple of times... It's not that I'm lacking knowledge

Re: [Haskell-cafe] Verifying a list of properties using QuickCheck

2008-10-22 Thread Martijn van Steenbergen
Thomas van Noort wrote: However, I would like a single result for the complete list of properties instead of a result for each property. I realize that this restricts the properties to be of the same type, but that isn't a problem for my application. Why not concatenate your properties into

Re: [Haskell-cafe] Re: A heretic question

2008-10-22 Thread Bulat Ziganshin
Hello Mauricio, Wednesday, October 22, 2008, 2:23:55 PM, you wrote: Well, one thing I miss from C++ is the idea of acquiring resources in constructors and releasing them in destructors, as explained here: (Haskell uses that in 'with...' functions, like 'withFile', but the syntax in C++

Re: [Haskell-cafe] Re: Build without install, using cabal

2008-10-22 Thread Sean Leather
I would like to include a few source files as 'executable' sections in a .cabal package description. However, although I do want to use main=mainDefault features, I do not want those packages to be installed when I run 'Setup.hs install'. Yes, just use this in the executable section:

Re: [Haskell-cafe] Verifying a list of properties using QuickCheck

2008-10-22 Thread Sebastiaan Visser
On Oct 22, 2008, at 1:03 PM, Martijn van Steenbergen wrote: Thomas van Noort wrote: However, I would like a single result for the complete list of properties instead of a result for each property. I realize that this restricts the properties to be of the same type, but that isn't a

[Haskell-cafe] Re: labels in HList

2008-10-22 Thread oleg
It seems that a couple of modules in HList libraries didn't have enough LANGUAGE pragmas (in one case, GHC 6.8.3 started to require ScopedTypeVariables where the previous version of GHC did not). Cabal and OOHaskell supply all needed extensions on the command line, and so see no problems. I have

Re: [Haskell-cafe] Verifying a list of properties using QuickCheck

2008-10-22 Thread Thomas M. DuBuisson
Thomas van Noort wrote: However, I would like a single result for the complete list of properties instead of a result for each property. I realize that this restricts the properties to be of the same type, but that isn't a problem for my application. You're types can be different, so long

[Haskell-cafe] Fwd: enhancing type classes with properties

2008-10-22 Thread Alberto G. Corona
I´m just thinking aloud, but, because incorporating deeper mathematics concepts has proven to be the best solution for better and more flexible programming languages with fewer errors, I wonder if raising the type classes incorporating axioms can solve additional problems. At first sight it does:

[Haskell-cafe] Re: Build without install, using cabal

2008-10-22 Thread Mauricio
(...) But I do want it to be built (so Setup will check dependencies, allow me to './Setup clean' etc.). However, I would like './Setup install' to install just the main library. Just in case my response to you (in a previous thread that you started) wasn't clear, EMGM also

[Haskell-cafe] Re: A heretic question

2008-10-22 Thread Achim Schneider
Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Mauricio, Wednesday, October 22, 2008, 2:23:55 PM, you wrote: Well, one thing I miss from C++ is the idea of acquiring resources in constructors and releasing them in destructors, as explained here: (Haskell uses that in 'with...'

RE: [Haskell-cafe] Fwd: enhancing type classes with properties

2008-10-22 Thread Mitchell, Neil
Hi Alberto, Take a look at ESC/Haskell and Sound Haskell, which provide mechanisms for doing some of the things you want. I don't think they integrate with type classes in the way you mention, but I think that is just a question of syntax. http://www.cl.cam.ac.uk/~nx200/ Thanks Neil

[Haskell-cafe] ANNOUNCE: rewriting-0.1

2008-10-22 Thread Thomas van Noort
Generic rewriting library for regular datatypes === This package provides rewriting functionality for regular datatypes. Regular datatypes are recursive datatypes such as lists, binary trees, etc. This library cannot be used with mutually recursive

[Haskell-cafe] Re: ghc error: requested module name differs from name found in interface file

2008-10-22 Thread Larry Evans
On 10/21/08 18:55, Larry Evans wrote: On 10/21/08 17:55, Duncan Coutts wrote: On Tue, 2008-10-21 at 09:41 -0500, Larry Evans wrote: Just that one little piece of information, that |cabal install| , by default, installs in ~/.cabal and then enables ghc to look there for packages, would have

Re: [Haskell-cafe] Re: Template Haskell

2008-10-22 Thread Andrew Coppin
Achim Schneider wrote: Imagine generating an HTML combinator library out of the HTML dtd. That seems like a fairly extreme thing to want to be doing... But yeah, if you wanted to do something like that, machine-generated is the way. (Presumably a much more common thing to want to do is

Re: [Haskell-cafe] Spine-lazy multiqueue

2008-10-22 Thread Luke Palmer
On Wed, Oct 22, 2008 at 3:14 AM, Ryan Ingram [EMAIL PROTECTED] wrote: Here's an infinite structure with logarithmic access time with natural numbers for keys. It's not particularily efficient for a sparse map, but if the maximum used key is linear in the size of your problem, it gives log(n)

Re: [Haskell-cafe] Spine-lazy multiqueue

2008-10-22 Thread Jamie Brandon
Ideas for how to make such tries composable would encourage me to release a hackage module :-) Have a look at code.haskell.org/gmap/api - a library for composable maps. It currently requires huge instances in the name of efficiency but I hope to improve that over the next couple of months. The

Re: [Haskell-cafe] Cabal warning

2008-10-22 Thread Duncan Coutts
On Tue, 2008-10-21 at 23:36 -0700, Peter Higley wrote: I had the same problem on a Mac system, change GHC to ghc and things will work. I didn't even think that it was an actual bug! Ticket #379 reports the problem. Thanks for reporting that. Duncan

[Haskell-cafe] any idea why cabal install cabal-install cant update itself in windows?

2008-10-22 Thread Anatoly Yakovenko
C:\Documents and Settings\anatolyycabal install cabal-install Resolving dependencies... 'cabal-install-0.6.0' is cached. Configuring cabal-install-0.6.0... Preprocessing executables for cabal-install-0.6.0... Building cabal-install-0.6.0... ... Linking dist\build\cabal\cabal.exe ... Installing:

Re: [Haskell-cafe] any idea why cabal install cabal-install cant update itself in windows?

2008-10-22 Thread Austin Seipp
Windows will not let you modify/delete binaries if they're running as a process, and it won't let you delete .DLL files that're in use by applications either (mapped to shared memory, that is.) So cabal install cannot overwrite the cabal.exe binary after it builds it, because it's already running.