Re: [Haskell-cafe] HookedBuildInfo and Cabal

2009-01-08 Thread Duncan Coutts
On Thu, 2009-01-08 at 12:42 -0600, John Goerzen wrote: As a more general question, how can one use Cabal to detect PostgreSQL paths in a way that works with both GHC 6.8 and 6.10? Yes: The following is using build-type: Simple in HDBC-postgresql.cabal and it does not use

[Haskell-cafe] Re: [Haskell] hsc2hs can't find gcc under windows

2008-12-30 Thread Duncan Coutts
On Tue, 2008-12-30 at 13:32 +0900, Curt Sampson wrote: Duncan, Good to talk to you again. You may remember me from ICFP. Indeed. :-) Anyway, thanks for the hint; I can probably make a workaround by adding the appropriate options for hsc2hs to the QAM build system. If you happen to know

Re: [Haskell-cafe] Data.ByteString join

2008-12-28 Thread Duncan Coutts
On Sun, 2008-12-28 at 03:54 -0600, Galchin, Vasili wrote: Prelude :m +Data.ByteString Prelude Data.ByteString :t join interactive:1:0: Not in scope: `join' Prelude Data.ByteString Why no join function? Because we removed it from the bytestring package in version 0.9. It had been

Re: [Haskell-cafe] chroot a single thread

2008-12-28 Thread Duncan Coutts
On Sun, 2008-12-28 at 00:22 -0500, Jeremy Shaw wrote: At Sat, 27 Dec 2008 22:41:58 -0600, brian wrote: On Sat, Dec 27, 2008 at 8:01 PM, Jeremy Shaw jer...@n-heptane.com wrote: The problem with that function is that chroot affects the root of the whole process. Yeah. Maybe you

Re: [Haskell-cafe] Missing Network Functions

2008-12-28 Thread Duncan Coutts
On Sun, 2008-12-28 at 08:47 -0800, Bryan O'Sullivan wrote: On Sun, Dec 28, 2008 at 1:38 AM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: getNthWord n bs@(PS ptr off len) = inlinePerformIO $ withForeignPtr ptr $ \ptr' - do

RE: [Haskell-cafe] forkIO on multicore[MESSAGE NOT SCANNED]

2008-12-26 Thread Duncan Coutts
On Tue, 2008-12-23 at 18:27 +, Paul Keir wrote: Hi Duncan, I'm following the story regarding (parallel) GC in this example with interest, but forgive me if I ask a more minor question regarding your modification of an extra parameter, n, to heavytask. Does this really help (to ensure

[Haskell-cafe] Re: [Haskell] hsc2hs can't find gcc under windows

2008-12-26 Thread Duncan Coutts
On Thu, 2008-12-25 at 15:17 +0900, Curt Sampson wrote: I'm trying to upgrade from ghc 6.8.3 to 6.10.1. Unfortunately, there seem to be problems with the Windows version. (I've installed it on two different machines, both Windows XP, and they've both had the same problem. Both worked fine with

Re: [Haskell-cafe] Cabal Install Links to Source from Haddock Docs

2008-12-23 Thread Duncan Coutts
On Mon, 2008-12-22 at 17:58 -0800, R Hayes wrote: Thank you. As it turns out, I was aware of that recipe. What I wanted was to be able to use cabal install's nice dependency following features and still get source links in my documentation. Due to popular demand we quickly added the

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-23 Thread Duncan Coutts
On Tue, 2008-12-23 at 03:56 +0100, wman wrote: Thanks to you all for inspiration. My web app (which otherwise ran ok) was getting stuck while getting harassed by ab (apache-benchmark) after receiving some 800+ requests in short succession (not less, never gotten to 900, what was weird that

Re: [Haskell-cafe] [Byte8] - ByteString

2008-12-23 Thread Duncan Coutts
On Tue, 2008-12-23 at 00:34 -0600, Galchin, Vasili wrote: Hello, I have been reading through Data-ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] - ByteString? Hoogle is your friend! http://haskell.org/hoogle/ [Word8] - ByteString

Re: [Haskell-cafe] intercalate and (byte)strings

2008-12-23 Thread Duncan Coutts
On Tue, 2008-12-23 at 05:21 +0100, wman wrote: I encountered the following code : -- B == Data.ByteString ; L == Data.ByteString.Lazy contents' = B.intercalate B.empty $ L.toChunks contents with a previously unencountered function intercalate. A quick google query later i knew that it's

Re: [Haskell-cafe] cabal, multi-file applications

2008-12-23 Thread Duncan Coutts
On Tue, 2008-12-23 at 17:27 +0100, Cetin Sert wrote: when I try to build the following program: http://sert.homedns.org/hs/hnm/ http://sert.homedns.org/hs/hnm/hnm.cabal How can I tell in my cabal file that wlan.hs should be built first than settings.hs than demo3.hs? You need to follow

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 11:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote: I tried to install the ghc 6.8.0 last year but failed for some reason. Now I decide to do it again, because I'd like to try some examples in Real World Haskell Now I remember why I try to install it from source code,

Re: [Haskell-cafe] Removing/Uninstalling cabal packages ?

2008-12-22 Thread Duncan Coutts
On Sun, 2008-12-21 at 13:30 -0600, brian wrote: On Sun, Dec 21, 2008 at 12:12 PM, Laurent Giroud m...@niaow.com wrote: I have been doing a few experiments with cabal packages lately and I wish to uninstall these to return to a cleaner package base. However, there doesn't seem to be a cabal

RE: [Haskell-cafe] Can I build and install GHC 6.10.1 withoutprevious installed ghc

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 17:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote: Hi Duncan, wget http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.bz2 tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2 Ahh, x86-64. Those have always been built on Fedora Core 5. My only

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 10:30 +, Malcolm Wallace wrote: For those who are puzzled, Don is suggesting that foreign import ccall unsafe foo :: Bar - Baz should simply be changed to foreign import ccall safe foo :: Bar - Baz And in case anyone is wondering whether fiddling with

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 08:15 -0600, John Goerzen wrote: Duncan Coutts wrote: On Mon, 2008-12-22 at 10:30 +, Malcolm Wallace wrote: The terminology seems counter-intuitive, but in other other words, a safe call is slower but more flexible, an unsafe call is fast and dangerous

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 22:12 +0100, Günther Schmidt wrote: Hi guys, I just tried to forkIO-off the database code to keep the UI responsive using Takusen with Sqlite this time. The problem persists though, the UI freezes. You might need to provide us more details on the GUI code. As I

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread Duncan Coutts
On Mon, 2008-12-22 at 22:55 +0100, Günther Schmidt wrote: Hi, I put in on hpaste: http://hpaste.org/13264 slightly simplified Ok, that works fine when the action is something like threadDelay so it's clearly not blocking the UI. Duncan ___

Re: [Haskell-cafe] non-functions like unsafePerformIO are not technically part of the haskell language!

2008-12-20 Thread Duncan Coutts
On Sat, 2008-12-20 at 15:43 +, Lennart Augustsson wrote: The current official Haskell standard is Haskell-98. There is no unsafePerformIO in there. It's in the FFI spec which is an official addendum to Haskell 98. ;-) Duncan ___ Haskell-Cafe

Re: [Haskell-cafe] sort and lazyness (?)

2008-12-19 Thread Duncan Coutts
On Fri, 2008-12-19 at 14:40 +0100, Daniel Kraft wrote: Hi, I'm just a beginner trying to learn a little about Haskell, and as such write some toy programs (e.g. for projecteuler.net) in Haskell. Currently, I'm experiencing what I would call strange behaviour: I've got a data-type

Re: [Haskell-cafe] Re: sort and lazyness (?)

2008-12-19 Thread Duncan Coutts
On Fri, 2008-12-19 at 15:58 +0100, Daniel Kraft wrote: How does reverse work in constant space? At the moment I can't imagine it doing so; that's why I tried it, but of course you could be right. It allocates a new list cell for every cell it finds in the input list. If the input list can be

Re: [Haskell-cafe] forkIO on multicore

2008-12-19 Thread Duncan Coutts
On Fri, 2008-12-19 at 10:42 -0600, Jake McArthur wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Keir wrote: fibs = 0 : 1 : zipWith (+) fibs (tail fibs) This is a CAF (Constant Applicative Form). Since it is actually a constant it is never garbage collected, and is always

[Haskell-cafe] Re: [Haskell] possible bug in pretty-1.0.1.0

2008-12-18 Thread Duncan Coutts
On Mon, 2008-12-15 at 08:17 -0800, John MacFarlane wrote: I noticed a difference in how hang works between pretty-1.0.0.0 and pretty-1.0.1.0. I think it's a bug. If this isn't the right place to report it, please let me know where I should. (Maintainer is listed as librar...@haskell.org, but

[Haskell-cafe] Re: [Haskell] possible bug in pretty-1.0.1.0

2008-12-18 Thread Duncan Coutts
On Thu, 2008-12-18 at 13:27 +, Neil Mitchell wrote: Hi Duncan, I'd just like to advertise the fact that as of Cabal-1.6 you can put a bug-reports field in your .cabal file and it will be displayed by hackage. Fantastic. Is it backwards compatible? i.e. if I add such a field, will

Re: [Haskell-cafe] gtk2hs question - derive SettingsWindow from Window

2008-12-18 Thread Duncan Coutts
On Fri, 2008-12-12 at 21:03 +0100, Cetin Sert wrote: Hi all, For a network manager of sorts I'm working on, I want to derive a SettingsWindowClass from the WindowClass present in Gtk2Hs: I want (the) instance(s) of the SettingsWindowClass to have a field to store connection settings:

Re: [Haskell-cafe] Conditional properties in QuickCheck alter test data generation?

2008-12-18 Thread Duncan Coutts
On Thu, 2008-12-18 at 20:09 +, Thomas Schilling wrote: This bug appears to be fixed in QuickCheck 2. However, for some reason cabal-install by default only installs 1.2. You have to explicitly ask for the newer version: $ cabal install QuickCheck-2.1.0.1 Or more generally: $ cabal

Re: [Haskell-cafe] Conditional properties in QuickCheck alter test data generation?

2008-12-18 Thread Duncan Coutts
On Thu, 2008-12-18 at 16:13 -0800, Max Rabkin wrote: On Thu, Dec 18, 2008 at 3:55 PM, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote: However QuickCheck seems to be a case where people now expect to use QC-2, but old packages that don't specify a version typically only work with QC-1.x

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 11:29 +0100, Sean Leather wrote: Now, I'm trying to use #ifndef __HADDOCK__ / #endif around those same modules, and I'm still running into the same internal Haddock error: haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing I've been using cabal haddock

Re: [Haskell-cafe] Retrospective on 2008?

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 14:00 +0100, Henk-Jan van Tuyl wrote: On Thu, 11 Dec 2008 06:35:24 +0100, Don Stewart [EMAIL PROTECTED] wrote: * Hackage currently holds 914 applications and libraries. Using the commands: cabal update cabal list | fgrep * | wc I counted 927 entries.

Re: [Haskell-cafe] Retrospective on 2008?

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 13:13 +, Dougal Stanton wrote: On Thu, Dec 11, 2008 at 1:00 PM, Henk-Jan van Tuyl [EMAIL PROTECTED] wrote: Using the commands: cabal update cabal list | fgrep * | wc I counted 927 entries. Unfortunately that's not a reliable means of determining cabal

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 16:26 +0100, Sean Leather wrote: The above is true, but then I ran it with --optghc=-D__HADDOCK__ and that fixed the problem. You see, I didn't know who was actually defining the __HADDOCK__ macro. Now, after looking at code for Haddock and Cabal, I realize it's Cabal.

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 18:20 +0100, Sean Leather wrote: For haddock-0.x, Cabal cpp's all the modules with -D__HADDOCK__ because the old haddock cannot parse all sorts of things. However for haddock-2.x it is important not to use -D__HADDOCK__

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Thu, 2008-12-11 at 23:32 +0100, Sean Leather wrote: That's quite a presumption there. I can certainly write a module that compiles and produces documentation for Haddock but that is different when compiled into binary form. Even without this

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Fri, 2008-12-12 at 00:22 +0100, Sean Leather wrote: Let's suppose that I do actually want to define __HADDOCK__ for my library. Can I do this with a user-defined hook using the Cabal library? main :: IO () main = defaultMainWithHooks hooks where hooks = simpleUserHooks { haddockHook

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Fri, 2008-12-12 at 00:19 +, Claus Reinke wrote: Still, you might find something useful in the discussion for this ticket: Cabal should support Cabal-version-dependent Setup.hs http://hackage.haskell.org/trac/hackage/ticket/326 or, more directly:

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Fri, 2008-12-12 at 01:01 +0100, Sean Leather wrote: Call the original haddockHook with the updated flags rather than the haddock command. No change in output. Ah, sorry I misread the code. This works: import Distribution.Simple import

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-11 Thread Duncan Coutts
On Fri, 2008-12-12 at 01:01 +, Duncan Coutts wrote: On Fri, 2008-12-12 at 01:01 +0100, Sean Leather wrote: Call the original haddockHook with the updated flags rather than the haddock command. No change in output. Ah, sorry I misread the code

Re: [Haskell-cafe] File name encodings

2008-12-10 Thread Duncan Coutts
On Tue, 2008-12-09 at 18:17 -0800, Don Stewart wrote: Oh, perhaps you want to 'decode' the string that dirOpenDialog returns. redcom: Hi Don, must be doing something wrong. The messed up string originates from calling Graphics.UI.WX.dirOpenDialog and selecting a directory

Re: [Haskell-cafe] Re: Does ghc use Language.Haskell.*?

2008-12-10 Thread Duncan Coutts
On Wed, 2008-12-10 at 09:32 -0200, Mauricio wrote: Why can ghc read the program, but not the standard library parser? Does ghc use something else? Is it possible to use whatever ghc uses to build a prettyprinter? Language.Haskell is known to be incomplete. The haskell-src-exts

Re: [Haskell-cafe] Can my type be allowed as return type in FFI?

2008-12-10 Thread Duncan Coutts
On Wed, 2008-12-10 at 08:33 -0200, Mauricio wrote: Hi, When I do: foreign import nameOfFunction nameOfFunction :: IO MyType I can get a function that return MyType only if it's a pointer or some of the C* type family. Is it possible to write a new MyType and make it allowed as a

Re: [Haskell-cafe] Re: Can my type be allowed as return type in FFI?

2008-12-10 Thread Duncan Coutts
On Wed, 2008-12-10 at 14:17 -0200, Mauricio wrote: foreign import nameOfFunction nameOfFunction :: IO MyType Is it possible to write a new MyType and make it allowed as a return type from foreign functions? Is changing the compiler the only way to do that?

Re: [Haskell-cafe] Problem with haddock 2.3.0 (again)

2008-12-10 Thread Duncan Coutts
On Wed, 2008-12-10 at 15:30 +0100, Sean Leather wrote: [Responding to an old (but still relevant) thread...] I'm getting this error as well, both in 2.3.0 and 2.4.1. Suppose that I wanted to generate documentation for everything in my Cabal package except for the modules with Template

Re: [Haskell-cafe] Cabal: defaultMainNoRead and source file location

2008-12-09 Thread Duncan Coutts
On Mon, 2008-12-08 at 14:49 -0200, Mauricio wrote: Hi, I've just seen this from Distribution.ModuleName (ghc 6.10): toFilePath $ ( simple A.B.C ) to which ghci answers: A.B.C. Shouldn't it say A/B/C? You're using it wrong. A 'simple' module name should have no '.' in it. Instead use

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.4

2008-12-09 Thread Duncan Coutts
On Thu, 2008-12-04 at 19:04 +0100, Niklas Broberg wrote: Fellow Haskelleers, it is my pleasure to announce the new release of the haskell-src-exts package, version 0.4.4: So when will we simply declare that haskell-src-exts is the new haskell-src? :-) That implementation is widely

Re: [Haskell-cafe] Building/installing haskelldb and friends with ghc 6.10.1

2008-12-09 Thread Duncan Coutts
On Sat, 2008-12-06 at 23:32 +0100, Laurent Giroud wrote: Hi everyone, I have been trying to install haskelldb in the last few days and encountered a number of hurdles which raised a few questions and for which I'd appreciate some insight and advice. Note that I am posting here because

[Haskell-cafe] deleting spam on the wiki

2008-12-05 Thread Duncan Coutts
Who is able to delete wiki spam? http://haskell.org/haskellwiki/?title=Special:Contributionstarget=Tomso123 All the pages created by this user appear to be spam (check the google translation) so the account should probably be deleted too. As I understand it, any registered user can revert

Re: [Haskell-cafe] Re: Functional version of this OO snippet

2008-12-05 Thread Duncan Coutts
On Fri, 2008-12-05 at 16:50 +0100, Thomas Davie wrote: Sure, and he could then use a fold instead of a map. Reading files is problematic, but as long as you're only doing it once (the most common situation) is entirely fine wrapped up in an unsafePerformIO. No! Please don't go

Re: [Haskell-cafe] Re: Functional version of this OO snippet

2008-12-05 Thread Duncan Coutts
On Fri, 2008-12-05 at 17:06 +0100, Thomas Davie wrote: On 5 Dec 2008, at 17:00, Duncan Coutts wrote: On Fri, 2008-12-05 at 16:50 +0100, Thomas Davie wrote: Sure, and he could then use a fold instead of a map. Reading files is problematic, but as long as you're only doing it once

Re: [Haskell-cafe] Data.ByteString vs Data.ByteString.Lazy vs Data.ByteString.Char8

2008-12-03 Thread Duncan Coutts
On Wed, 2008-12-03 at 01:52 -0600, Galchin, Vasili wrote: Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package binary-0.4.2 requires bytestring-0.9.0.1 package bio-0.3.4.1 requires bytestring-0.9.1.0

Re: [Haskell-cafe] ByteString web site papers

2008-12-03 Thread Duncan Coutts
On Tue, 2008-12-02 at 22:56 -0600, Galchin, Vasili wrote: Hello, http://www.cse.unsw.edu.au/~dons/fps.html Are the papers/slides still up-to-date for someone to get up-to-speed on ByteString motivation and implementation? Yes. Anything more recent? It links to the stream fusion paper

Re: [Haskell-cafe] Cabal and Hat?

2008-12-03 Thread Duncan Coutts
On Wed, 2008-12-03 at 09:36 +, Magnus Therning wrote: Is it possible to use cabal to build the files that hat would need to do tracing (i.e. .htx files)? No, but if you'd like to add support that'd be a great service to everyone. Duncan ___

Re: [Haskell-cafe] Re: Compatible problem with GHC 6.10.1

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 19:58 +0800, Andy Stewart wrote: Hi Dunca, Duncan Coutts [EMAIL PROTECTED] writes: And i use darcs version of gtk2hs, when i ./configure, i got below information: But when i make, i got below error information: , | glib/System/Glib.hs:13:0: | Failed

Re: [Haskell-cafe] Re: Compatible problem with GHC 6.10.1

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 11:01 +, Colin Paul Adams wrote: Duncan == Duncan Coutts [EMAIL PROTECTED] writes: gstreamer Duncan Those names are the names of the Haskell Duncan components/packages. All of them (except soegtk) are Duncan wrappers for C libraries with similar

Re: [Haskell-cafe] Re: Compatible problem with GHC 6.10.1

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 15:48 +0800, Andy Stewart wrote: When i ./configure gtk2hs souce code, i will got below information: , | * The following packages will be built: | * | * glib : yes |

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 16:55 +, Claus Reinke wrote: But when I actually try to build anything using (yes, I know the explicit package flags aren't needed with --make) ghc --make -package OpenGL -package GLUT something.hs I get nothing but undefined references in the linking phase.

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 18:04 +, Claus Reinke wrote: ghc --make -package OpenGL -package GLUT something.hs I get nothing but undefined references in the linking phase. C:\Program Files\Haskell\GLUT-2.1.1.2\ghc-6.11.20081202/libHSGLUT-2.1.1.2.a(Window.o):fake: (.text+0x15):

Re: [Haskell-cafe] Data.ByteString vs Data.ByteString.Lazy vs Data.ByteString.Char8

2008-12-02 Thread Duncan Coutts
On Tue, 2008-12-02 at 17:43 -0600, Galchin, Vasili wrote: Hello, Some mention is made in corresponding web pages about implementation difference of these three different DataString impl. Any advice? Perhaps you need to ask a more specific question. Data.ByteString is a simple strict

Re: [Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-01 Thread Duncan Coutts
On Mon, 2008-12-01 at 22:48 +0100, Diego Echeverri wrote: I've created a wiki page, http://haskell.org/haskellwiki/The_Knights_Tour I note the LogicT version is the shortest so far. -- Don Probably noob question. I was looking into the first solution in the page and tried to replace

Re: [Haskell-cafe] Cabal

2008-11-30 Thread Duncan Coutts
On Sun, 2008-11-30 at 21:14 +0100, Henning Thielemann wrote: On Sun, 30 Nov 2008, Don Stewart wrote: lemming: Maybe you like to add a pointer in cabal-install.cabal/Homepage field to this page. Good idea. Duncan? After I finished that article, I also found:

Re: [Haskell-cafe] Cabal (was: Compilers)

2008-11-30 Thread Duncan Coutts
On Sat, 2008-11-29 at 17:49 -0800, John Meacham wrote: On Sun, Nov 30, 2008 at 01:37:20AM +, Thomas Schilling wrote: So that's over 2 SLOC, but, of course, for a more powerful tool. So I presume the 4x more code remark by John was about the Makefile rules to implement something

Re: [Haskell-cafe] Cabal

2008-11-30 Thread Duncan Coutts
On Sun, 2008-11-30 at 10:57 +, Andrew Coppin wrote: As I understand it, that's also a seperate download. (Whereas the cabal library comes with GHC.) One day, if I feel hard-core enough, I might try this tool. (Assuming it works on Windows...) It sounds potentially useful. It will of

Re: [Haskell-cafe] Compilers

2008-11-29 Thread Duncan Coutts
On Fri, 2008-11-28 at 19:30 -0800, John Meacham wrote: On Wed, Nov 26, 2008 at 07:20:12PM -0800, Jason Dagit wrote: I spoke with the author of the fork a bit in IRC around the time it happened and my understanding is that: 1) John sternly objects to using cabal as the build system for JHC

Re: [Haskell-cafe] Re: Go Haskell! - array libraries

2008-11-29 Thread Duncan Coutts
On Fri, 2008-11-28 at 22:20 +, Lennart Augustsson wrote: But I don't want Perl, I want a well designed language and well designed libraries. I think it's find to let libraries proliferate, but at some point you also need to step back and abstract. Yes, let the ideas simmer and when we can

Re: Re[2]: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-11-29 Thread Duncan Coutts
On Sat, 2008-11-29 at 18:13 +0300, Bulat Ziganshin wrote: Hello Jason, Saturday, November 29, 2008, 5:55:06 PM, you wrote: It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze. Well, I'll have a chance to verify this soon enough.

Re: Re[4]: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-11-29 Thread Duncan Coutts
On Sat, 2008-11-29 at 19:57 +0300, Bulat Ziganshin wrote: Hello Duncan, Saturday, November 29, 2008, 7:49:52 PM, you wrote: It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze. unfortunately, HsLua already breaks the law :)

Re: [Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

2008-11-28 Thread Duncan Coutts
On Thu, 2008-11-27 at 17:20 +, Ian Lynagh wrote: On Wed, Nov 26, 2008 at 10:28:21PM +, Duncan Coutts wrote: I should note that one moral of this story is to check that your FFI imports are correct. That is, check they import the foreign functions at the right Haskell types

Re: [Haskell-cafe] Re: catting to cat gets stuck at 135K

2008-11-28 Thread Duncan Coutts
On Thu, 2008-11-27 at 11:38 -0500, Brandon S. Allbery KF8NH wrote: On 2008 Nov 27, at 8:51, Simon Marlow wrote: No, the issue is that without real OS threads, a foreign call can't be pre-empted (pretty obvious when you think about it). waitForProcess ends up making a blocking foreign

Re: [Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

2008-11-27 Thread Duncan Coutts
On Wed, 2008-11-26 at 23:16 +, Malcolm Wallace wrote: ... to work out the C types and then map them to Haskell ones, to check they're the same as the declared types in the .hs files. I'd like to point out that the FFI specification already has such a mechanism. That is, if you use

Re: [Haskell-cafe] Re: [Haskell] Wait for *either* MVar to be set

2008-11-26 Thread Duncan Coutts
On Wed, 2008-11-26 at 13:25 -0800, Ryan Ingram wrote: In fact: import Control.Concurrent.STM import Control.Concurrent.STM.TMVar -- gets a value from one of a list of TMVars takeTMVars :: [TMVar a] - STM (TMVar a, a) takeTMVars = foldr fetch retry where fetch v act = (takeTMVar

Re: [Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

2008-11-26 Thread Duncan Coutts
On Wed, 2008-11-26 at 14:38 +, Eric Kow wrote: Hi everybody, This advisory is for people who have installed darcs 2.1.2 via the Cabal build method. As you may have noticed, the cabalised darcs sometimes fails with errors like Codec.Compression.Zlib: incorrect data check Why this

Re: [Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

2008-11-26 Thread Duncan Coutts
On Wed, 2008-11-26 at 14:30 -0800, Don Stewart wrote: I think there is a need for a tool like c2hs but that works in a checking mode rather than in a generating mode. It would use much of the same code as c2hs but it would read the C header files and the .hs file (via ghc api) and check

Re: [Haskell-cafe] build tools and Cabal

2008-11-25 Thread Duncan Coutts
On Tue, 2008-11-25 at 01:30 +, John Lato wrote: Hello, Cabal allows specifying arguments for tools it recognizes on the command line, e.g. runhaskell Setup.hs configure --c2hs-option=some_option Unfortunately, I can't find a way to make this work with .cabal (or .buildinfo) files,

[Haskell-cafe] Re: cabal install HaXml installs wrong version unless I specify the version number

2008-11-24 Thread Duncan Coutts
On Mon, 2008-11-24 at 15:16 +0100, Thomas Hartman wrote: I have run into another issue with cabal packaging, which seems related to the issues discussed above. (see attached tar file for complete example of failure scenario) If I have a cabal package that depends on two other packages --

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Duncan Coutts
On Sat, 2008-11-22 at 23:34 -0500, Paul L wrote: On 11/22/08, Don Stewart [EMAIL PROTECTED] wrote: ninegua: Hi everyone, It's sad to see the OpenGL binding being dropped from GHC binary installers starting from 6.10. Though this issue has been brought up and discussed before, I'm sure

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Duncan Coutts
On Sun, 2008-11-23 at 12:30 +, Claus Reinke wrote: It's sad to see the OpenGL binding being dropped from GHC binary installers starting from 6.10. Though this issue has been brought up and discussed before, I'm sure a lot of people who based their work on OpenGL would share the

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Duncan Coutts
On Sun, 2008-11-23 at 08:00 -0500, Paul L wrote: On 11/23/08, Duncan Coutts [EMAIL PROTECTED] wrote: 2. It still wouldn't work for the OpenGL package on Windows, because the configure scripts require a Unix-style built environment (MinGW/MinSys or Cygwin). Yes, building it requires

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Duncan Coutts
On Sun, 2008-11-23 at 09:24 -0500, Jeff Heard wrote: Duncan, what kind of help do you need on the Haskell Platform install? I have access to VMs running windows XP and Vista. The haskell-platform meta-package is here: darcs get http://code.haskell.org/haskell-platform/ This specifies the list

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-23 Thread Duncan Coutts
On Sun, 2008-11-23 at 16:41 +0100, Manlio Perillo wrote: Claus Reinke ha scritto: [...] 2. It still wouldn't work for the OpenGL package on Windows, because the configure scripts require a Unix-style built environment (MinGW/MinSys or Cygwin). [...] - they need to install MinGW/MSys

Re: [Haskell-cafe] Do I need an account to report build of Hacakge packages?

2008-11-22 Thread Duncan Coutts
On Fri, 2008-11-21 at 16:12 -0800, Ahn, Ki Yung wrote: I am just curious about how cabal report works. I recently figured out that there is a report command in cabal and it reports the reports generated by --build-reports option when building a package. Is this because I don't have an

Re: [Haskell-cafe] Do I need an account to report build of Hacakgepackages?

2008-11-22 Thread Duncan Coutts
On Sat, 2008-11-22 at 15:11 +, Claus Reinke wrote: You only need an account for uploading packages. If you do not want to have to enter your user name or password interactively when you run cabal upload then you can put them in the config file: username: password: That sounds

Re: [Haskell-cafe] How to use Unicode strings?

2008-11-22 Thread Duncan Coutts
On Sat, 2008-11-22 at 10:02 -0800, Don Stewart wrote: Use the UTF8 printing functions, import qualified System.IO.UTF8 as U main = U.putStrLn Ну и где этот ваш хвалёный уникод? Running this, *Main main Ну и где этот ваш хвалёный уникод? This upsets me. We need to

Re: [Haskell-cafe] Extensible Exceptions

2008-11-22 Thread Duncan Coutts
On Sun, 2008-11-23 at 01:40 +0100, Henning Thielemann wrote: On Sat, 22 Nov 2008, Thomas Schilling wrote: It's a pattern match error, implemented by throwing an asynchronous exception. The idea being, that we only have one mechanism (well, an synchronous exceptions, thrown via throwIO).

Re: [Haskell-cafe] Hackage policy question

2008-11-20 Thread Duncan Coutts
On Wed, 2008-11-19 at 20:25 -0800, John Meacham wrote: The usual solution to this is the 'release version', which is used in most (all?) other packaging systems. namely, you have foo-1.2-4, where 4 is the release version which documents what version the meta-info is. For instance, when bugs

Re: [Haskell-cafe] GHC 6.10.1 and cabal[-install]

2008-11-20 Thread Duncan Coutts
On Thu, 2008-11-20 at 10:41 +1300, Daniel McAllansmith wrote: On Wed, 19 Nov 2008 21:27:36 Duncan Coutts wrote: It's even easier than that! Someone has done it already :-) http://hackage.haskell.org/trac/hackage/ticket/261 Thu Aug 28 16:55:16 CEST 2008 Chry Cheng [EMAIL PROTECTED

Re: [Haskell-cafe] GHC 6.10.1 and cabal[-install]

2008-11-20 Thread Duncan Coutts
On Wed, 2008-11-19 at 10:28 +0100, Wolfgang Jeltsch wrote: Am Dienstag, 18. November 2008 22:24 schrieben Sie: How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in?

Re: [Haskell-cafe] Cabal and more than one version

2008-11-20 Thread Duncan Coutts
On Wed, 2008-11-19 at 02:15 -0800, Jason Dusek wrote: Duncan Coutts [EMAIL PROTECTED] wrote: Jason Dusek wrote: In the ticket, someone says: True though I suspect it looks a bit weird to the uninitiated. We know to read the conditional syntax as an implication constraint which

Re: [Haskell-cafe] GHC 6.10.1 and cabal[-install]

2008-11-20 Thread Duncan Coutts
On Thu, 2008-11-20 at 11:03 +, Duncan Coutts wrote: On Wed, 2008-11-19 at 10:28 +0100, Wolfgang Jeltsch wrote: The cabal user guide lists the default install directories for global and user installs. Okay, I looked at the cabal-install docs. And the only doc seems

Re: [Haskell-cafe] Hackage policy question

2008-11-20 Thread Duncan Coutts
On Thu, 2008-11-20 at 04:06 -0800, John Meacham wrote: Well, my main concern is that I have projects that have several distribution formats, tarball, rpm, deb, and hopefully hackage (alongside the others as equals). I don't want the version numbers to get out of sync though, just because I

Re: [Haskell-cafe] Hackage policy question

2008-11-20 Thread Duncan Coutts
On Thu, 2008-11-20 at 05:56 -0800, John Meacham wrote: On Thu, Nov 20, 2008 at 12:56:31PM +, Duncan Coutts wrote: On Thu, 2008-11-20 at 04:06 -0800, John Meacham wrote: Well, my main concern is that I have projects that have several distribution formats, tarball, rpm, deb

Re: [Haskell-cafe] GHC 6.10.1 and cabal[-install]

2008-11-19 Thread Duncan Coutts
On Tue, 2008-11-18 at 13:56 -0800, Jason Dagit wrote: Will Hackage one day provide a way to discover that one package has been superceeded by another? Currently you can see when a newer version of the exact same package exists, but (for

Re: [Haskell-cafe] Cabal and more than one version

2008-11-19 Thread Duncan Coutts
On Tue, 2008-11-18 at 16:53 -0800, Jason Dusek wrote: In the ticket, someone says: True though I suspect it looks a bit weird to the uninitiated. We know to read the conditional syntax as an implication constraint which can be applied in either direction but I suspect many

Re: Fwd: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-19 Thread Duncan Coutts
On Tue, 2008-11-18 at 22:42 +0100, Alberto G. Corona wrote: sorry, Dons, -- Forwarded message -- From: Alberto G. Corona [EMAIL PROTECTED] Date: 2008/11/18 Subject: Re: [Haskell-cafe] implementing python-style dictionary in Haskell To: Don Stewart [EMAIL PROTECTED] By

Re: [Haskell-cafe] Deploying a Binary Haskell Package

2008-11-18 Thread Duncan Coutts
On Tue, 2008-11-18 at 10:20 -0500, John Van Enk wrote: This question isn't directly related to Haskell, but I figure some one might know here. I want to deploy an application. I could either: 1) Tell people how to download GHC, have them check out the repository, have them install all the

Re: [Haskell-cafe] GHC 6.10.1 and cabal[-install]

2008-11-18 Thread Duncan Coutts
On Tue, 2008-11-18 at 14:23 +0100, Wolfgang Jeltsch wrote: Am Dienstag, 18. November 2008 11:01 schrieb Wolfgang Jeltsch: Hello, I installed GHC 6.10.1 today and expected it to contain the cabal command line utility. Unfortunately, this was not the case. Where can I download it?

Re: [Haskell-cafe] Cabal and more than one version

2008-11-18 Thread Duncan Coutts
On Tue, 2008-11-18 at 01:48 -0800, Jason Dusek wrote: I'd like to be able to do something like: if (template-haskell 2.3) cpp-options: -D TH_THE_YOUNGER else cpp-options: -D TH_THE_ELDER I guess this kind of thing is not possible at present? It is possible, in two

[Haskell-cafe] Re: cabal install HaXml installs wrong version unless I specify the version number

2008-11-15 Thread Duncan Coutts
On Sat, 2008-11-15 at 12:39 +0100, Thomas Hartman wrote: When I specify Build-Depends: base, parsec, HaXml = 1.19.4 in xml-parsec.cabal it does install correctly. Yes, saying what version it needs is a good thing. It's all guesses otherwise. I guess what happens is that cabal install

[Haskell-cafe] Re: [Haskell] ANNOUNCE: haskell-src-exts 0.4.1

2008-11-15 Thread Duncan Coutts
On Sat, 2008-11-15 at 02:26 +0100, Niklas Broberg wrote: Fellow Haskelleers, it is my pleasure to announce the new release of the haskell-src-exts package, version 0.4.1: 2) ... I've finally decided to take the plunge and get rid of the ugly prefixes on all datatypes in the AST. I am of

[Haskell-cafe] Re: cabal install HaXml installs wrong version unless I specify the version number

2008-11-15 Thread Duncan Coutts
On Sat, 2008-11-15 at 13:31 +0100, Thomas Hartman wrote: This is all news to me, and un-googleable to boot: http://www.google.pl/search?hl=ensa=Xoi=spellresnum=0ct=resultcd=1q=cabal+referred-versionsspell=1 (no results) It finds something for me (with the right spelling of preferred), eg

Re: [Haskell-cafe] Problem installing curl

2008-11-11 Thread Duncan Coutts
On Tue, 2008-11-11 at 10:49 -0800, Don Stewart wrote: curl-1.3.2.1 failed during the configure step. The exception was: sh: runGenProcess: does not exist (No such file or directory) I don't know what to do here. Can anybody help me please? I'm using the brand new GHC 6.10.1 on

<    1   2   3   4   5   6   7   8   9   10   >