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 fiddlin

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

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

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

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 http://haskell.

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

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 foll

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

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

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 > > :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 deprecate

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 wrote: > > > The problem with that function is that chroot affects the root of the > > > whole process. > > > > Yeah. Maybe you want pri

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 > wrote: > getNthWord n bs@(PS ptr off len) = > inlinePerformIO $ withForeignPtr ptr $ \ptr' -> > do > let p = castPtr $

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

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 HDBC-postgresql.bu

RE: [Haskell-cafe] HookedBuildInfo and Cabal

2009-01-09 Thread Duncan Coutts
On Sat, 2009-01-10 at 01:40 +0100, Brian B wrote: > Hi Duncan, > > This works for me too, many thanks. Great. > The only change I needed was that the real pg_config outputs a newline > where your fake one didn't: Ah yes, good point. Duncan ___ Haske

[Haskell-cafe] Re: [Haskell] HaskellWiki Upgrade Aborted

2009-01-11 Thread Duncan Coutts
On Sat, 2009-01-10 at 19:02 -0800, Ashley Yakeley wrote: > I have given up attempting to upgrade HaskellWiki, and resumed the > site's previous normal operation. > > I wrote: > > I will also need up upgrade both PHP and MySQL. > > It turns out it would be hard to upgrade MySQL, as various things

Re: [Haskell-cafe] Re: System.CPUTime and picoseconds

2009-01-11 Thread Duncan Coutts
On Sun, 2009-01-11 at 16:03 +0100, Peter Verswyvelen wrote: > wouldn't a double become less and less precise the longer the process > is running? > > > so Integer sounds like the only datatype that could work here... > > > and why not do it like in Windows: make two functions, one that > retur

Re: [Haskell-cafe] Re: System.CPUTime and picoseconds

2009-01-11 Thread Duncan Coutts
On Sun, 2009-01-11 at 21:41 +0100, Peter Verswyvelen wrote: > Let's assume you were joking, but just in case you were not... > > > Why this hostile tone? I didn't mean to be offensive. I'm sorry, I did not intend it to sound hostile. I mis-interpreted the "..." at the end of your sentenc

Re: [Haskell-cafe] version conflict on Hackage

2009-01-12 Thread Duncan Coutts
On Mon, 2009-01-12 at 13:21 +0100, Henning Thielemann wrote: > I repeatedly encounter the following versioning problem on Hackage: > There is a package A with version 1.0. > I upload a package B which imports A. > Thus B is bound to A-1.0 > Now a new version of A is uploaded, say 1.0.1. > then I up

Re: [Haskell-cafe] ANN: HLint 1.2

2009-01-12 Thread Duncan Coutts
On Mon, 2009-01-12 at 01:02 +0100, Lennart Augustsson wrote: > Does GHC specialize map? If it doesn't, then hand crafted version > could be faster. No because the current definition are recursive and ghc cannot inline recursive functions. map :: (a -> b) -> [a] -> [b] map _ [] = [] map f (x:

Re: [Haskell-cafe] Question about touchForeignPtr

2009-01-12 Thread Duncan Coutts
On Sun, 2009-01-11 at 17:43 -0800, Patrick Perry wrote: > The "touchForeignPtr" is there to keep the garbage collector from > deallocating the memory before we have a chance to read 'e'. My > question is the following: > Is the `seq` on `io` necessary (from a safety standpoint)? Or am I > ju

Re: [Haskell-cafe] ANN: HLint 1.2

2009-01-12 Thread Duncan Coutts
On Mon, 2009-01-12 at 15:06 +0100, Henning Thielemann wrote: > > It has to be manually transformed into a version that is not recursive > > at the top level: > > > > map :: (a -> b) -> [a] -> [b] > > map f = go > > where > >go [] = [] > >go (x:xs) = f x : go xs > > > > Then the map c

[Haskell-cafe] haskell-platform mailing list

2009-01-12 Thread Duncan Coutts
Hi all, If you are interested in helping out with the haskell platform project then we invite you to subscribe to the haskell-platform mailing list. http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform This mailing list is for discussing practical stuff. We expect to discuss pol

Re: [Haskell-cafe] Gtk2Hs on Windows for GHC 6.10.1

2009-01-12 Thread Duncan Coutts
On Tue, 2009-01-13 at 00:09 +0100, Peter Verswyvelen wrote: > Gtk2Hs 0.9.13 has an annoying bug on Windows that makes it impossible > to run via GHCi. > > > So to see if the latest development version works better, I tried to > build it on Windows using GHC 6.10.1, but I failed to do so with both

Re: [Haskell-cafe] Win32 API

2009-09-19 Thread Duncan Coutts
On Sat, 2009-09-19 at 08:52 +0100, Andrew Coppin wrote: > This was complicated by a small glitch: Graphics.Win32.Window exposes > SendMessage() but does not expose PostMessage(). Kind of an important > difference there. Fortunately, it's not actually especially hard to fix > this deficiency. (B

Re: [Haskell-cafe] Suggested additions to System.FilePath.Posix/Windows

2009-09-19 Thread Duncan Coutts
On Thu, 2009-09-17 at 11:58 +0200, Marcus D. Gabriel wrote: > > -- | 'reduceFilePath' returns a pathname that is reduced to canonical > > -- form equivalent to that of ksh(1), that is, symbolic link names are > > -- treated literally when finding the directory name. See @cd -L@ of > > -- ksh(1).

Re: [Haskell-cafe] help with cabal; trying to escape from configuration hell

2009-09-23 Thread Duncan Coutts
On Tue, 2009-09-22 at 17:13 +0200, S. Doaitse Swierstra wrote: > I am trying to run happstack on my Mac, but unfortunately I am getting > error messages as described in: > > http://code.google.com/p/happstack/issues/detail?id=88 > > The cure seems to be to downgrade to network-2.2.0.1, but >

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Tue, 2009-09-22 at 17:08 -0400, Brandon S. Allbery KF8NH wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Sep 22, 2009, at 11:31 , Günther Schmidt wrote: > > Gtk2hs then complains about running in a multithreaded ghc, ie. one > > with several "real" OS threads. Is it possible t

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Wed, 2009-09-23 at 20:24 +0200, Günther Schmidt wrote: > >> No, but you can unsafeInitGUIForThreadedRTS. > > > > If you observe the foot-shooting restrictions (of which the easiest is > > to not use forkIO). > > > And exactly herein lies the problem :) > > I've seen your response to the recent

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-23 Thread Duncan Coutts
On Wed, 2009-09-23 at 15:52 -0400, Ross Mellgren wrote: > Well, keep in mind forkIO *might* be a different OS thread Yes. > (unless it's bound, IIRC) In which case it's guaranteed to be on a different OS thread.. > depending on the number of workers (with -Nx) and so on. The number of capabi

Re: [Haskell-cafe] Status of GHC as a Cross Compiler

2009-09-24 Thread Duncan Coutts
On Wed, 2009-09-23 at 14:50 -0400, John Van Enk wrote: > Hi, > > This may be more appropriate for a different list, but I'm having a > hard time figuring out whether or not we're getting a cross compiler > in 6.12 or not. Can some one point me to the correct place in Traq to > find this informatio

Re: [Haskell-cafe] gtk2hs and runghc

2009-09-24 Thread Duncan Coutts
On Thu, 2009-09-24 at 00:10 +0200, Günther Schmidt wrote: > Hi Duncan, > > so ... I have a green light to call gtk from within a forkIO thread for as > long as I make sure that the rts is single threaded? Yes and that works very nicely (with the cooperative scheduling trick described in the gtk

Re: [Haskell-cafe] Bug in writeArray?

2009-09-24 Thread Duncan Coutts
On Thu, 2009-09-24 at 13:53 +0200, Grzegorz Chrupała wrote: > 2009/9/23 Bulat Ziganshin : > > Hello Grzegorz, > > > > Wednesday, September 23, 2009, 7:19:59 PM, you wrote: > > > >> This seems like a bug in the implementation of writeArray: when passed > >> let (l,u) = ((0,10),(20,20)) > > > > wri

Re: [Haskell-cafe] Haddock and literate Haskell: annotations must be marked as source?

2009-09-24 Thread Duncan Coutts
On Thu, 2009-09-24 at 17:49 +0100, Andy Gimblett wrote: > So: am I right that this is the intended/expected behaviour? If not, > how does one get round it? If so, could someone perhaps comment on > the prospects/complexity of implementing this - or the reasons why it > is in fact a bad ide

Re: [Haskell-cafe] Haddock and literate Haskell: annotations must be marked as source?

2009-09-24 Thread Duncan Coutts
On Thu, 2009-09-24 at 19:48 +0100, Andy Gimblett wrote: > That's great news for me, except: that's what I tried first, and I've > just tried it again and it still doesn't seem to work for me. Perhaps > I am doing something wrong...? You're quite right, it got broken with the move to haddock2

Re: [Haskell-cafe] Hackage bug? Autobuild failure on literate source with ignored code blocks.

2009-09-28 Thread Duncan Coutts
On Sun, 2009-09-27 at 21:06 +0100, John Millikin wrote: > According to , > the following should compile properly because the second block of code > will be ignored by GHC: > > \begin{code} > main = putStrLn "Hello world!" > \end{code} > > \

Re: [Haskell-cafe] QuickCheck Questions

2009-09-28 Thread Duncan Coutts
On Mon, 2009-09-28 at 23:59 +0900, Yusaku Hashimoto wrote: > After a few more investigations, I can say > > QuickCheck does: > - make easy to finding couter-cases and refactoring codes > - make easy to test some functions if they have good mathematical properties > - generate random test cases >

Re: [Haskell-cafe] unicode text libraries

2009-09-28 Thread Duncan Coutts
On Mon, 2009-09-28 at 14:16 +0100, Titto Assini wrote: > Hi, > > I am looking for an unicode strings library, I found on hackage: > > http://hackage.haskell.org/package/compact-string > > http://hackage.haskell.org/package/text > > They both look solid and functionally complete so ... I don't

Re: [Haskell-cafe] unicode text libraries

2009-09-28 Thread Duncan Coutts
On Mon, 2009-09-28 at 18:32 +0200, Johan Tibell wrote: > On Mon, Sep 28, 2009 at 6:15 PM, Don Stewart wrote: > > tittoassini: > >> 2009/9/28 Don Stewart : > >> > titto: > >> >> Hi, > >> >> > >> >> I am looking for an unicode strings library, I found on hackage: > >> >> > >> >> http://hackage.hask

Re: [Haskell-cafe] unicode text libraries

2009-09-29 Thread Duncan Coutts
On Tue, 2009-09-29 at 10:48 +0200, Ketil Malde wrote: > Johan Tibell writes: > > > I agree with Don. Also, I don't think that a Unicode type should > > mention what encoding it uses as it's an implementation detail. > > Right. I see from the documentation that it uses Word16s (and presumably >

Re: [Haskell-cafe] Hackage bug? Autobuild failure on literate source with ignored code blocks.

2009-09-29 Thread Duncan Coutts
On Mon, 2009-09-28 at 12:53 -0700, John Millikin wrote: > In that case, I'll update my code and the wiki to use an alternative code > style. Ok. > On Mon, Sep 28, 2009 at 09:21, Duncan Coutts > wrote: > > Your local Cabal version is older than the one Hackage is u

Re: [Haskell-cafe] suggestion for hslogger

2009-09-30 Thread Duncan Coutts
On Tue, 2009-09-29 at 14:31 -0400, Sean McLaughlin wrote: > Hello, > > > I have a program that does a lot of unicode manipulation. I'd like > to use hslogger to log various operations. > However, since hslogger uses System.IO.putX, the unicode comes out > mangled. I hacked the source to > use

Re: Fwd: [Haskell-cafe] suggestion for hslogger

2009-09-30 Thread Duncan Coutts
On Wed, 2009-09-30 at 08:36 -0500, John Goerzen wrote: > If you want to send me a patch that makes it an option (not mandatory), > I would be happy to apply it. When reviewing it do consider the new Unicode IO library. http://ghcmutterings.wordpress.com/2009/09/30/heads-up-what-you-need-to-know-a

Re: [Haskell-cafe] Exceptions during exception unwinding

2009-10-01 Thread Duncan Coutts
On Thu, 2009-10-01 at 03:29 +, Brian Bloniarz wrote: > I had a question about onException & friends: what's the rationale > for having: > (error "foo") `onException` (error "bar") > > give bar and not foo? > I.e. why does an exception raised during exception handling get > propagated past th

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: usb-0.1

2009-10-01 Thread Duncan Coutts
On Thu, 2009-10-01 at 16:22 +0200, Martijn van Steenbergen wrote: > Roel van Dijk wrote: > > Yes, that happens. I don't now the cause but the work-around is easy. > > Simply download the package manually from hackage, unpack and install > > using cabal. > > > > At least the following packages suff

Re: [Haskell-cafe] c2hs, size_t, and CSize -- argh!

2009-10-01 Thread Duncan Coutts
On Thu, 2009-10-01 at 10:20 -0400, John Van Enk wrote: > Hello List, > > I'm running into a problem with c2hs and how it parses the C typedef > 'size_t'. On 32bit systems, this ends up being parsed as a CUInt. On > 64bit systems, this ends up as a CULong. This gets especially sticky > with functio

Re: [Haskell-cafe] c2hs, size_t, and CSize -- argh!

2009-10-01 Thread Duncan Coutts
On Thu, 2009-10-01 at 13:00 -0400, John Van Enk wrote: > Hi Duncan, > > Yes, I forgot to leave out that I'd like to see 'size_t' mapped to > CSize. > > As a (dirty) workaround, one can use 'castPtr' as the marshaler when > dealing with pointers to 'size_t'. I'm a little more concerned about > Fun

Re: [Haskell-cafe] Mutable data within a (non-IO) monad

2009-10-03 Thread Duncan Coutts
On Fri, 2009-10-02 at 20:00 -0700, Gregory Crosswhite wrote: > Sorry to reply to my own posting, but... AHA! I see now what's going > on. The purpose of the rank-2 qualifier is to prevent STRefs from > leaking outside of the runST call, and what the code does at the > lowest level is that i

Re: [Haskell-cafe] better way to do this?

2009-10-04 Thread Duncan Coutts
On Sun, 2009-10-04 at 02:52 -0700, Michael Mossey wrote: > I'm looking for a hint to write the following code with less redundancy. I > have a constructor called BoxBounds, and I want to make one with random > values. > > randomBox :: IO BoxBounds > randomBox = do > x <- getStdRandom (randomR (-

Re: [Haskell-cafe] better way to do this?

2009-10-04 Thread Duncan Coutts
On Sun, 2009-10-04 at 05:11 -0700, Michael Mossey wrote: > Duncan Coutts wrote: > > Others have already answered but I'd like to suggest that you avoid > > using IO here. There's no need for this to be impure. > Can you point me to a tutorial that covers the basics o

Re: [Haskell-cafe] better way to do this?

2009-10-07 Thread Duncan Coutts
On Tue, 2009-10-06 at 13:22 -0700, Michael P Mossey wrote: > Duncan Coutts wrote: > > > So you end up with pure functions like: > > > > shuffle :: RandomGen g => g -> [x] -> [x] > > Thanks for the help, Duncan. I'm confused on one point. Don't

Re: [Haskell-cafe] Cabal, sdist and flags

2009-10-08 Thread Duncan Coutts
On Thu, 2009-10-08 at 09:31 +0100, Magnus Therning wrote: > A while ago I moved a project away from using a mix of Cabal and make > to build (Cabal to build the library and make to build the tests) to > using only Cabal. I added a flag and then made a construct like this: [..] > Interestingly th

Re: [Haskell-cafe] #include path

2009-10-08 Thread Duncan Coutts
On Thu, 2009-10-08 at 00:37 -0400, Sean McLaughlin wrote: > Hi, > > > I'm trying to compile some code using Cabal. One of the files has a > CPP directive > > > #include "undefined.h" > > > The file undefined.h is in the same directory as the file with the > directive. That works fine for

Re: [Haskell-cafe] Can HXT and Parsec 3 be used in the same library?

2009-10-09 Thread Duncan Coutts
On Sun, 2009-10-04 at 10:32 -0700, John Millikin wrote: > I'm writing a library that needs to parse both plain text (with Parsec) > and XML (with HXT). HXT's .cabal file specifies that it only works with > parsec (>= 2.1 && < 3), but it still builds when I depend on parsec >= > 3. It's only during

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

2009-10-09 Thread Duncan Coutts
On Thu, 2009-10-08 at 09:43 -0600, John A. De Goes wrote: > Here's a list of libraries that are quite significant to commercial > software development in 2009, For the kinds of applications that you would like to build. > but which either do not exist in Haskell, or if they exist, are hard > to

Re: [Haskell-cafe] Setting environment variables on Windows

2009-10-09 Thread Duncan Coutts
On Fri, 2009-10-09 at 17:37 +0200, Sönke Hahn wrote: > Hi! > > I need to set an environment variable from Haskell and i would like to do > that > cross-platform. There is System.Posix.Env.setEnv, which does exactly, what i > want on Linux. There is the module System.Environment, which seems to

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 > wrote: > > There's been an open ticket for months; personally I think > this is a job > > for the C preprocessor, but nobody's written a patch yet. > >

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"

[Haskell-cafe] Re: Reverse dependencies in Hackage

2009-10-13 Thread Duncan Coutts
On Tue, 2009-10-13 at 21:30 +0200, Roel van Dijk wrote: > I also noticed that work is underway to implement a new hackage-server > [2] based on happstack. If people find this feature useful I could > also write a patch against the hackage-server code base [3]. That would be much appreciated. Dun

Re: [Haskell-cafe] Too much strictness in binary-0.5.0.2

2009-10-18 Thread Duncan Coutts
On Sat, 2009-09-19 at 00:36 +0400, Khudyakov Alexey wrote: > Hello > > I run into problems with new binary package. Following function reads a list > of elements one by one until end of stream. List is very long (won't fit into > memory). Sorry for the late reply. > In binary-0.5.0.1 and earli

Re: [Haskell-cafe] Too much strictness in binary-0.5.0.2

2009-10-18 Thread Duncan Coutts
On Sun, 2009-10-18 at 19:53 +0400, Alexey Khudyakov wrote: > > Yes. We decided that having the Get monad as a lazy state monad just > > doesn't make sense. It makes this one use case work, but causes more > > problems generally. Certainly we need to be able to do lazy binary > > deserialisation too

Re: [Haskell-cafe] Time Typeable Instances

2009-10-23 Thread Duncan Coutts
On Tue, 2009-10-13 at 08:48 -0500, John Goerzen wrote: > Now I'm getting complaints from people using 6.10.4 saying that there > are now missing instances of Typeable with time 1.1.2.4. Right, because 1.1.2.4 is an earlier version than 1.1.3 which is the random intermediate snapshot version inclu

Re: [Haskell-cafe] Re: ghci can't find Paths_ module created by cabal

2009-10-26 Thread Duncan Coutts
On Wed, 2009-10-21 at 22:31 -0500, Thomas Hartman wrote: > from my bash hints file: > > thart...@ubuntu:~/haskellInstalls/gitit>thartman_ghci_with_data_files > Loading a package with data files in ghci > See > http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html >

Re: [Haskell-cafe] Cabal says "no installed version of base"

2009-10-27 Thread Duncan Coutts
On Wed, 2009-10-21 at 16:05 -0700, John Velman wrote: > I'm on OS X Leopard 10.5.8, using ghc 6.10.4 from Haskell Platform. > > I'm trying to get a static .a library, callable from C, that I can use in > an OS X Cocoa program. I've tried a very simple case (the one in Haskell > Wiki Tutorials,"ca

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Duncan Coutts
On Tue, 2009-10-27 at 17:00 +0100, Daniel Fischer wrote: > Look at the sources: > > hGetLine :: Handle -> IO ByteString > hGetLine h = wantReadableHandle "Data.ByteString.hGetLine" h $ \ handle_ -> do > case haBufferMode handle_ of >NoBuffering -> error "no buffering" >_other

Re: [Haskell-cafe] cabal probems with binary/containers packages

2009-10-28 Thread Duncan Coutts
On Tue, 2009-10-27 at 21:37 -0700, brian wrote: > It all started with this: > > Loading package binary-0.5.0.1 ... can't load .so/.DLL for: > HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found) > > so I tried > > > cabal upgrade binary Don't do that. Just use cabal insta

Re: [Haskell-cafe] cabal haddock hpc, exposed modules?

2009-10-28 Thread Duncan Coutts
On Tue, 2009-10-27 at 14:33 -0700, Greg Fitzgerald wrote: > my Setup.hs includes an explicit system call to hpc: > > exec "hpc" ["markup" > , "--include=Language.Idl.Data" > , "--include=Language.Idl.Merge" > , "--include=Languag

Re: [Haskell-cafe] cabal probems with binary/containers packages

2009-10-28 Thread Duncan Coutts
On Wed, 2009-10-28 at 07:07 -0700, brian wrote: > Just found the following file: > > .ghc/powerpc-darwin-6.10.1/pkg-config > > and it is referring to 0.5.0.1. > > Is there anyway to regenerate the file, or is it broken because of a > problem with the package ? > >> It all started with this: >

Re: [Haskell-cafe] cabal haddock hpc, exposed modules?

2009-10-28 Thread Duncan Coutts
On Wed, 2009-10-28 at 10:43 -0700, Greg Fitzgerald wrote: > Duncan wrote: > > $ cabal haddock --help > > [...] > > --executables Run haddock for Executables targets > > --internal Run haddock for internal modules and > include > > all symbols > > [

Re: [Haskell-cafe] What's the deal with Clean?

2009-11-04 Thread Duncan Coutts
On Tue, 2009-11-03 at 18:12 -0800, brian wrote: > Really, arrays in Haskell are the most @#!$! confusing thing in the > world. > > There's a bunch of different array structures. > > I can't tell which one works best, and all I want to do is x[i] = value. > I thought uvector was the answer, you

Re: [Haskell-cafe] Cabal

2009-11-09 Thread Duncan Coutts
On Sun, 2009-11-08 at 20:47 -0800, Gregory Crosswhite wrote: > Actually, let me clarify my point: I have rarely encountered problems > when using Cabal as a package distribution system, but I have run into > problems when using it as a build system in a non-trivial manner. For > example, when I w

Re: [Haskell-cafe] Cabal

2009-11-09 Thread Duncan Coutts
On Sun, 2009-11-08 at 19:29 -0800, Philippos Apolinarius wrote: > I made small improvements in the Small Japi Binding, and asked how to > make it available. I received a few private messages advising me to > build and package the library using a tool called cabal. Since I have > used installation t

Re: [Haskell-cafe] Re: cabal install on Windows

2009-11-09 Thread Duncan Coutts
On Mon, 2009-11-09 at 16:02 +, Michael Fan wrote: > I figured it out. It appears to be "Colour" package specific. > The datadir still point to "c:\Program File" even with --user. > I manually edit the dist/setup-config and get Colour installed. > After that, other packages seem working fine. >

Re: [Haskell-cafe] Cabal

2009-11-09 Thread Duncan Coutts
On Mon, 2009-11-09 at 13:08 +, Stephen Tetley wrote: > At this point I'd edit the *.cabal files in each component – this is > not 'the done thing', but both libraries need extra flags and as I > have to compile them rarely I tend to forget the format (which appears > to be Windows style full p

Re: [Haskell-cafe] Cabal

2009-11-09 Thread Duncan Coutts
On Sun, 2009-11-08 at 19:29 -0800, Philippos Apolinarius wrote: > D:\ghc\ghcapi>cabal install mkcabal Note that as of cabal-install-0.8, the "mkcabal" functionality is integrated as "cabal init" (thanks to Brent Yorgey). This does not depend on less portable packages like pcre and readline (meani

Re: [Haskell-cafe] Cabal

2009-11-09 Thread Duncan Coutts
On Mon, 2009-11-09 at 17:40 +, Stephen Tetley wrote: > 2009/11/9 Duncan Coutts : > > > > > That should work, and probably the recommendation should be for cygwin > > users to edit their cabal config to at add C:\cygwin\lib and C:\cygwin > > \usr\include

Re: [Haskell-cafe] Fwd: (Solved) cabal install with external gcc tool chain not the ghc-bundled one

2009-11-12 Thread Duncan Coutts
On Thu, 2009-11-12 at 10:46 +0100, Daniel Kahlenberg wrote: > to answer this question myself how the use of another gcc is specified > with effect, I used the following options with the 'cabal install' call: > > --ghc-options="-pgmc e:/programme/ghc/mingw-gcc4/bin/gcc.exe -pgml > e:/programme/ghc

Re: [Haskell-cafe] Cabal and autogenerated files

2009-11-12 Thread Duncan Coutts
On Thu, 2009-11-12 at 17:54 +, Jeremy O'Donoghue wrote: > Hi all, > > Another, probably simple, question regarding cabalization. > > Part of wxcore, the low level abstraction in wxHaskell, consists of > haskell modules which are generated automatically by parsing C headers > using another too

RE: [Haskell-cafe] Cabal upload issue

2009-11-12 Thread Duncan Coutts
On Thu, 2009-11-12 at 17:37 +, Sam Martin wrote: > Although it might be a pain in the arse to some degree, is there any > reason why 'base' is considered special? > > As an example, I've come across a fair number of libraries/apps that > (presumably) compile against a previous version of Open

Re: [Haskell-cafe] Resource compilation in GHC

2009-11-13 Thread Duncan Coutts
On Thu, 2009-11-12 at 11:52 +0100, David Virebayre wrote: > On Thu, Nov 12, 2009 at 11:12 AM, Konstantin Vladimirov > wrote: > > Hello. > > > I'm writing an wxHaskell application. Everything is ok, but now I need > > a separate folder for icons, bitmaps, and so on, from where they are > > loaded

Re: [Haskell-cafe] Sometimes pinned memory?

2009-11-13 Thread Duncan Coutts
On Wed, 2009-11-11 at 13:14 -0800, Gregory Crosswhite wrote: > Hey everyone! Do you have any suggestions for how I might allocate an > aligned block of memory that I can pin while making foreign calls, but > leave unpinned the rest of the time to potentially improve allocation > and garbage

Re: [Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 12:08 -0200, Maurí­cio CA wrote: > >> There's one thing special about bindings-DSL. It's > >> a package with a set of macros for hsc2hs, and contains > >> no Haskell code. Maybe this revealed some hidden error > >> in package dependency checking. > > > > This is a package wit

Re: [Haskell-cafe] Cabal and autogenerated files

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:24 +, Jeremy O'Donoghue wrote: > > So I take it that these modules are generated "from nothing" rather than > > something like happy/alex pre-processors where the .hs files are > > generated from .y/.x files. Cabal supports the latter fairly well and > > you can add cu

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 20:08 +, Neil Mitchell wrote: > Hi Niklas, > > >> Do I have to write my own prettyprinter? Do I have to put in explicit > >> parentheses? The latter seems unsatisfactory as my generated AST is > >> unambiguous > >> and bracketing ought to be part of the prettyprinter. Th

Re: [Haskell-cafe] Re: Weird dependency failure log

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:53 -0200, Maurí­cio CA wrote: > >>> This is a package with no library and no executables. That's > >>> not supposed to work. > > >> Why shouldn't this be supposed to work? It does install needed > >> files (two include files for hsc2hs), and they do stand for > >> them

Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 15:16 -0200, Rafael Gustavo da Cunha Pereira Pinto wrote: > > "...in my humble opinion. (Which, obviously, nobody else will agree > with.)" > > I somewhat agree with your opinion!! > > What I miss the most is practical examples: > > 1) A function that uses a Monoid as a co

Re: [Haskell-cafe] Re: Writing great documentation

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 23:20 +0200, Max Rabkin wrote: > On Fri, Nov 13, 2009 at 10:58 PM, Simon Michael wrote: > > A very common problem with online docs is fragmentation. > > Absolutely! Is it possible to include non-haddock documentation in a > cabal package. Is it possible to have it readable o

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Duncan Coutts
On Fri, 2009-11-13 at 23:54 +0100, Niklas Broberg wrote: > > Surely you do want this. It's the biggest problem with the original > > haskell-src package, that it cannot print out any useful Haskell code > > obtained from the parser, because it forgets all the brackets. > > I should point out that

[Haskell-cafe] ANNOUNCE: New Industrial Haskell Group membership options

2009-11-16 Thread Duncan Coutts
ith a lower financial commitment. For more details on all of the above, please see http://industry.haskell.org/ If your company or group is interested in joining then please e-mail i...@industry.haskell.org -- Duncan Coutts, Haskell Consultant Well-Typed LLP, http://www.well-type

Re: [Haskell-cafe] creating documentation links failed with cabal install --haddock-options=--hyperlink-source. is this a bug?

2009-11-16 Thread Duncan Coutts
On Sat, 2009-10-31 at 10:45 -0500, Thomas Hartman wrote: > cabal haddock -–hyperlink-source > > installs documentation with links to source code, which also be on by defualt. > > cabal install –haddock-options=–hyperlink source > > does not install hyperlinked source. This is an instance of the

Re: [Haskell-cafe] C headers in cabal dependencies

2009-11-16 Thread Duncan Coutts
On Wed, 2009-10-28 at 17:34 -0200, Maurí­cio CA wrote: > Hi, > > I've been using 'install-includes' in a package. I sometimes make > small changes to those include files, and I've seen that cabal > doesn't consider then dependencies, i.e., doesn't rebuild .hsc > files depending on then. > > I'm n

Re: [Haskell-cafe] How much time until dependencies are rebuilt in hackage?

2009-11-16 Thread Duncan Coutts
On Sat, 2009-11-14 at 17:31 -0200, Felipe Lessa wrote: > On Sat, Nov 14, 2009 at 01:47:04PM -0200, Maurí­cio CA wrote: > > Suppose package B depends on A. If a new > > version of A is uploaded to hackage, how much > > later package B will be rebuilt (either to show > > a problem with the new versio

[Haskell-cafe] Re: ANNOUNCE: deepseq-1.0.0.0

2009-11-17 Thread Duncan Coutts
On Tue, 2009-11-17 at 11:00 +, Simon Marlow wrote: > I've just uploaded deepseq-1.0.0.0 to Hackage > >http://hackage.haskell.org/package/deepseq > > This provides a DeepSeq class with a deepseq method, equivalent to the > existing NFData/rnf in the parallel package. I'll be using this i

Re: [Haskell-cafe] How to show record syntax?

2009-11-17 Thread Duncan Coutts
On Tue, 2009-11-17 at 17:14 +0100, Sean Leather wrote: > > module Main where > > data A = A {x :: Int} deriving Show > > main = print $ Just A {x = 5} > This led to an issue report [3] which developed a few responses. Some > don't like the grammar as defined, because, at a glance, it appears > to

Re: [Haskell-cafe] Re: ANNOUNCE: deepseq-1.0.0.0

2009-11-18 Thread Duncan Coutts
On Wed, 2009-11-18 at 09:17 +, Simon Marlow wrote: > So the main difference is that with the current formulation of deepseq, > you need to explicitly force the result in order to use it, either with > a pattern match, another seq, or a pseq. If we used (a -> b -> b) then > the top-level fo

[Haskell-cafe] Re: community.haskell.org is down

2009-11-19 Thread Duncan Coutts
On Thu, 2009-11-19 at 21:15 +, Neil Mitchell wrote: > Hi, > > community.haskell.org isn't responding, I get connection failures. Ta, sorted. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: How does cabal determine version ranges in the dependencies?

2009-11-26 Thread Duncan Coutts
On Mon, 2009-11-23 at 19:38 +0100, dave wrote: > On Mon, 2009-11-23 at 09:50 -0200, Maurí­cio CA wrote: > > > I recently started porting cabal-install to Freebsd. When > > > I looked at its dependencies on hackage, I noticed HTTP > > > (>=4000.0.2 && <4001). However the latest HTTP version on > >

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