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] 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-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] 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] 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] 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] 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] 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: 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] 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: [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] 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] 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-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] 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] 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] 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] 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] 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] 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] 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-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] 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 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] 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] 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] 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] trouble compiling Crypto-4.2.0 / trouble with cabal

2009-09-14 Thread Duncan Coutts
On Sun, 2009-09-13 at 19:54 +0200, mf-hcafe-15c311...@etc-network.de wrote: > > Hi, > > Cabal is still fighting me all the time. Its latest move is to be > oblivious of some of the installed packages: For future reference: http://haskell.org/cabal/FAQ.html#runghc-setup-complains-of-missing-pac

Re: [Haskell-cafe] Can't install chp (confused by cabal yet again)

2009-09-14 Thread Duncan Coutts
On Mon, 2009-09-14 at 12:05 -0700, Michael Steele wrote: > You got the original error because cabal chose to use base-3 when > compiling chp, and then identifiers found only in base-4 were > referenced. > > > Download the cabal package, and edit chp.cabal so that it depends on > base >= 4. Or as

RE: [Haskell-cafe] Cabal install on Windows 7

2009-09-14 Thread Duncan Coutts
On Thu, 2009-09-10 at 15:18 +0200, Regis Saint-Paul wrote: > One way in which cabal can be made UAC aware (and therefore request for > elevation privileges instead of just failing) would be to embed a manifest > in the cabal.exe. This can be done by changing the default manifest (an XML > file) tha

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-13 Thread Duncan Coutts
On Sat, 2009-09-12 at 23:24 +0100, Ganesh Sittampalam wrote: > Darcs already has a WIN32-specific workaround for renaming going wrong > when the new file exists, and my initial guess was that was what was going > wrong here. BTW, this is not necessary afaik. Rename over an existing file works j

Re: [Haskell-cafe] adding state in GUIs (qtHaskell)

2009-09-10 Thread Duncan Coutts
On Wed, 2009-09-09 at 18:29 -0700, Michael P Mossey wrote: > I'm trying to learn qtHaskell. I realize few people on this list know > anything > about qtHaskell, but I have a question that probably relates to all GUIs as > implemented in Haskell. I just need a hint that could help me figure out t

Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-10 Thread Duncan Coutts
On Wed, 2009-09-09 at 21:18 -0500, Jeff Wheeler wrote: > On Wed, Sep 9, 2009 at 2:19 PM, Sebastian > Sylvan wrote: > > > I think it's morally right to run as user by default. Yes, the windows > > culture has some legacy that may, on occasion, make it slightly harder to > > use "well behaved" progr

Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-10 Thread Duncan Coutts
On Wed, 2009-09-09 at 20:19 +0100, Sebastian Sylvan wrote: > > > On Wed, Sep 9, 2009 at 1:28 PM, Duncan Coutts > wrote: > > If the Windows users can come to a consensus on whether the > default should be global or user, then we can easily switch &

Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-09 Thread Duncan Coutts
On Wed, 2009-09-09 at 16:59 +0200, Peter Verswyvelen wrote: > Yes, it's true that most people tended to be administrators on their > own Windows desktops, but since Vista, this has changed. > > Now in Vista, some people still forced admin rights, to get rid of the > many annoying dialog boxes that

Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-09 Thread Duncan Coutts
On Tue, 2009-09-08 at 09:58 -0500, Jeff Wheeler wrote: > On Tue, Sep 8, 2009 at 9:17 AM, Peter Verswyvelen wrote: > > > Ouch, right, I forgot the default is global. It works fine with cabal > > install --user. And of course I could have edited the default config > > file, setting user-install: Tru

Re: [Haskell-cafe] Cabal install specific version of a package

2009-09-07 Thread Duncan Coutts
On Wed, 2009-09-02 at 21:12 +0400, Grigory Sarnitskiy wrote: > How to install specific version of a package (derive 0.1.4)? For other examples see the --help output: $ cabal install --help [..snip..] Examples: cabal install Package in the current directory cabal install

[Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.1

2009-08-25 Thread Duncan Coutts
On Mon, 2009-08-24 at 21:13 -0700, John Meacham wrote: > Hi, I am happy to announce the jhc optimizing haskell compiler version 0.7.1. Congratulations on getting a public release out. A few comments: 1. Would it be possible to have a machine-readable form of: jhc --list-libraries It's possib

Re: [Haskell-cafe] Where does documentation get installed with cabal?

2009-08-23 Thread Duncan Coutts
On Thu, 2009-08-20 at 14:17 -0400, John Dorsey wrote: > Perhaps it's in /usr/local/share/doc. Mine seem to end up there, and I > don't recall whether I specified that at any point. > > It's not in my ~/.cabal/config, but I am using the very helpful > user-install: False > documentation: True

Re: [Haskell-cafe] C2HS issues on Hackage

2009-08-10 Thread Duncan Coutts
On Tue, 2009-08-04 at 07:07 +0300, Michael Snoyman wrote: > Hi all, > > I've written a Yaml library built on top of libyaml (the same C > library at the core of Python's yaml library). All is well on my local > system and my server; I'm currently using it in production. However, > the build is fai

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Duncan Coutts
On Sun, 2009-07-19 at 23:07 +0100, Thomas Schilling wrote: > 2009/7/19 Max Bolingbroke > > > > Dear Cafe, > > > > For fun, I spent a few hours yesterday implement support for this > > syntax in GHC, originally propsed by Koen Claessen: > > > > >>> [k, "=", v, " " | (k, v) <- [("foo", "1"), ("bar",

Re: [Haskell-cafe] RE: Haskell as a first language?

2009-07-14 Thread Duncan Coutts
On Tue, 2009-07-14 at 03:01 -0700, Michael Vanier wrote: > Charles, > > Haskell is a wonderful language (my favorite language by far) but it is > pretty difficult for a beginner. In fact, it is pretty difficult for > anyone to learn in my experience, because it has so many advanced > concepts

[Haskell-cafe] Re: what about moving the record system to an addendum?

2009-07-07 Thread Duncan Coutts
On Mon, 2009-07-06 at 18:28 -0700, John Meacham wrote: > Well, without a replacement, it seems odd to remove it. Also, Haskell > currently doesn't _have_ a record syntax (I think it was always a > misnomer to call it that) it has 'labeled fields'. None of the proposed > record syntaxes fit the same

Re: Re[6]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Thu, 2009-07-02 at 03:01 +0400, Bulat Ziganshin wrote: > Hello Duncan, > > Thursday, July 2, 2009, 2:57:29 AM, you wrote: > > > You don't need it to be the same between Windows and Unix, it just has > > to be standard on each platform, which it is. There are really only two > > ABIs in common

Re: Re[4]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Thu, 2009-07-02 at 01:26 +0400, Bulat Ziganshin wrote: > Hello Duncan, > > Tuesday, June 30, 2009, 4:18:32 AM, you wrote: > > > Actually passing structs and unions as arguments or function results is > > specified by the C ABI. See for example the IA32 ABI: > > > http://www.caldera.com/develo

Re: Re[2]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Tue, 2009-06-30 at 18:59 -0700, John Meacham wrote: > On Tue, Jun 30, 2009 at 01:18:32AM +0100, Duncan Coutts wrote: > > On IA32 structs/unions passed as parameters go by value on the stack. > > For structs/unions as function results, they are stored into a > > caller-

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Duncan Coutts
On Tue, 2009-06-30 at 18:31 -0700, John Meacham wrote: > On Tue, Jun 30, 2009 at 08:02:48PM -0400, Daniel Peebles wrote: > > But we don't want to imply it's commutative either. Having something > > "bidirectional" like <> or <+> feels more commutative than associative > > to me. Of course in Text.

Re: Re[2]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-06-29 Thread Duncan Coutts
On Tue, 2009-06-30 at 00:45 +0400, Bulat Ziganshin wrote: > Hello Duncan, > > Tuesday, June 30, 2009, 12:03:15 AM, you wrote: > > > struct ex { > > int x; > > int y; > > int z; > > }; > > > ex example_functions (ex p) > > afaik, there is C ABI, that defines how to pass and return

Re: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-06-29 Thread Duncan Coutts
On Wed, 2009-06-24 at 18:48 -0700, John Meacham wrote: > On Wed, Jun 24, 2009 at 10:23:29AM -0300, Maurí­cio wrote: > > However, isn't just knowing the size and alignment enough to > > write a generic struct handler that, by using the appropriate > > calling convention, is going to work with any st

Re: [Haskell-cafe] Re: FFI and heap memory usage limit

2009-06-29 Thread Duncan Coutts
On Fri, 2009-06-26 at 13:00 +0100, Simon Marlow wrote: > Maybe bzlib allocates using malloc()? That would not be tracked by > GHC's memory management, but could cause OOM. Yes it does. > Another problem is that if you ask for a large amount of memory in one > go, the request is usually honour

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-23 Thread Duncan Coutts
On Tue, 2009-06-23 at 09:31 -0400, Brandon S. Allbery KF8NH wrote: > On Jun 22, 2009, at 07:37 , Duncan Coutts wrote: > > One explanation is that isBlah asks "is this thing a blah", but we're > > not asking that because there is an indirection via the filepath. &

Re: [Haskell-cafe] Documentation on hackage

2009-06-22 Thread Duncan Coutts
On Mon, 2009-06-15 at 06:49 -0700, Don Stewart wrote: > si: > > Dear Haskellers, > > > > who needs this kind of documentation? > > > > http://hackage.haskell.org/packages/archive/tfp/0.2/doc/html/Types-Data-Num-Decimal-Literals.html > > > > isn't this a kind of spam? > > > > Seems like a good

Re: [Haskell-cafe] How to determine if a FilePath is a directory name or regular file?

2009-06-22 Thread Duncan Coutts
On Mon, 2009-06-22 at 08:53 +0200, Deniz Dogan wrote: > 2009/6/22 Colin Paul Adams : > >> "Judah" == Judah Jacobson writes: > > > >Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul > >Judah> Adams wrote: > >>> I've been hoogling like bad to try to determine if a function > >>

Re: [Haskell-cafe] packages on Hackage?

2009-06-21 Thread Duncan Coutts
On Thu, 2009-06-18 at 23:26 -0500, Vasili I. Galchin wrote: > Hello, > > Haskell packages on Hackage can be hosted anywhere, yes? Yes. > If a Haskell package is hosted on Hackage, how often is it > backed up? It's not especially wise to rely on Hackage for your backup needs since it

Re: [Haskell-cafe] Re: Unicode workaround for getDirectoryContents under Windows?

2009-06-18 Thread Duncan Coutts
On Thu, 2009-06-18 at 04:47 +0300, Yitzchak Gale wrote: > I wrote: > >> OK, would you like me to reflect this discussion in tickets? > >> Let's see, so far we have #3300, I don't see anything else. > >> > >> Do you want two tickets, one each for WIndows/Unix? Or > >> four, separating the FilePath a

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-15 Thread Duncan Coutts
http://haskell.org/cabal/FAQ.html#runghc-setup-complains-of-missing-packages On Mon, 2009-06-15 at 10:30 +0300, Roman Cheplyaka wrote: > I'm CC:ing Duncan, probably he can help. > > * Magicloud Magiclouds [2009-06-15 > 10:01:03+0800] > > # ghc-pkg list gtk > > /var/lib/ghc-6.10.3/./package.con

Re: [Haskell-cafe] install problems ...

2009-06-14 Thread Duncan Coutts
On Thu, 2009-06-11 at 23:50 -0500, Vasili I. Galchin wrote: > Hello, > > As I have said before I a, "cabalizing" Swish (a semantic web > toolkit). I have it built and have run most of the original author's > tests by and they pass. There are numerous warnings which seem to be > either lack of a

RE: [Haskell-cafe] ghci and applicative

2009-06-12 Thread Duncan Coutts
On Fri, 2009-06-12 at 15:00 +0100, Paul Keir wrote: > Thanks Ryan, I'm slowly becoming aware of the effects of Monomorphism. > I'll look > again at Neil Mitchell's blog post. > > I guess it's the same thing when I try: > > > let a = 1 > > a + 1.0 > > I'm taking the "mono" as a clue that the type

Re: [Haskell-cafe] Re: a cool paper (.pdf) on Cabal?

2009-06-11 Thread Duncan Coutts
ols > >by Isaac Jones, Simon Peyton Jones, Simon Marlow, Malcolm Wallace, and > >Ross Patterson > >http://www.haskell.org/cabal/proposal/ > > Sorry, I forgot that you had specified a .pdf paper in the title. There's a pdf of the same: http://www.haskell.org/cabal/proposal/pkg-

Re: [Haskell-cafe] nubBy seems broken in recent GHCs

2009-06-10 Thread Duncan Coutts
On Sat, 2009-06-06 at 18:39 +0200, Bertram Felgenhauer wrote: > Interesting. This was changed in response to > > http://hackage.haskell.org/trac/ghc/ticket/2528 > > | Tue Sep 2 11:29:50 CEST 2008 Simon Marlow > | * #2528: reverse the order of args to (==) in nubBy to match nub > | Thi

Re: [Haskell-cafe] Slow documentation generation on Hackage

2009-06-08 Thread Duncan Coutts
On Mon, 2009-06-08 at 11:24 +0200, Ketil Malde wrote: > "Niemeijer, R.A." writes: > > > If that is the main concern, would the following not work? > > [...] > > > Result: immediate documentation for every contributor with good > > intentions Having the server generate docs itself would be

Re: [Haskell-cafe] GHCI & Curl under Windows

2009-06-04 Thread Duncan Coutts
On Thu, 2009-06-04 at 12:57 +1000, John Lask wrote: > The issue you are experiencing is the result of ghci not using import > libraries to resolve external symbols. Just a bit of explanation for > reference, which will also help you understand the solution to your problem. [..] > The long and the

Re: [Haskell-cafe] Notice for package authors

2009-06-03 Thread Duncan Coutts
On Wed, 2009-06-03 at 11:36 +0100, Duncan Coutts wrote: > Package authors, > > We are about to add an additional quality check in the Hackage upload > process that will affect many packages. Hackage will require an upper > bound on the version of the base package and reject pac

[Haskell-cafe] Notice for package authors

2009-06-03 Thread Duncan Coutts
Package authors, We are about to add an additional quality check in the Hackage upload process that will affect many packages. Hackage will require an upper bound on the version of the base package and reject packages that omit it. Lots of packages currently specify: build-depends: base

Re: [Haskell-cafe] Data.Binary and little endian encoding

2009-05-28 Thread Duncan Coutts
On Thu, 2009-05-28 at 12:08 -0400, John Van Enk wrote: > > I'm trying to implement the protocol, so that I can implement > other things on top of that. > > I'm also trying to figure out how bad/good Haskell Binary IO > really is that it's been a

Re: [Haskell-cafe] platform/cabal problems

2009-05-27 Thread Duncan Coutts
On Wed, 2009-05-27 at 22:43 +0200, Johannes Waldmann wrote: > Hi all. > > I've written some Haskell program, > and I wanted to give it to a friend, in source form, > so he can run and modify it, and learn some Haskell > while doing so. I was using some cabalized extra packages > but hey, this look

Re: [Haskell-cafe] A problem with par and modules boundaries...

2009-05-26 Thread Duncan Coutts
On Mon, 2009-05-25 at 09:40 -0400, Mario Blazevic wrote: > >> $diff main.simpl imported.simpl > >> ... > >> 223c232 > >> < a_s1rs [ALWAYS Just L] :: GHC.Integer.Internals.Integer > >> --- > >>> a_s1sV [ALWAYS Just S] :: GHC.Integer.Internals.Integer > >> ... > > > > Good find! > > > >

Re: [Haskell-cafe] Re: Parsing command lines

2009-05-25 Thread Duncan Coutts
On Mon, 2009-05-25 at 17:45 +0200, Patai Gergely wrote: > > There getArgs and getProgName in System module. If you want > > parse this parameters there is System.Console.GetOpt. > Those will only tell me how my program was called. I want to work with > command lines as data within my program, which

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-25 Thread Duncan Coutts
On Sun, 2009-05-24 at 16:36 +0200, Ketil Malde wrote: > Duncan Coutts writes: > > > The PVP says: > > > 1. If any entity was removed, or the types of any entities > > or the definitions of datatypes or classes were changed, > >

Re: Re: Re: Re: [Haskell-cafe] Re: A problem with par and modules boundaries...

2009-05-24 Thread Duncan Coutts
On Sun, 2009-05-24 at 12:48 -0400, Mario Blažević wrote: > > How about diffing the whole core output (and using -ddump-simpl). If > > there's a performance difference then there must be a difference in the > > core code too. > I can't exactly use diff because the generated identifier names are no

Re: Re: Re: [Haskell-cafe] Re: A problem with par and modules boundaries...

2009-05-24 Thread Duncan Coutts
On Sat, 2009-05-23 at 20:42 -0400, Mario Blažević wrote: > On Sat 23/05/09 2:51 PM , Duncan Coutts duncan.cou...@worc.ox.ac.uk sent: > > On Sat, 2009-05-23 at 13:31 -0400, Mario Blažević wrote: > > ... > >> So the function is not strict, and I don't understand >

Re: [Haskell-cafe] hackage version scheme survey

2009-05-24 Thread Duncan Coutts
On Sat, 2009-05-23 at 19:57 -0500, br...@lorf.org wrote: > On Saturday, 23.05.09 at 17:26, Don Stewart wrote: > > http://haskell.org/haskellwiki/Package_versioning_policy ? > > That helps a lot. I should have found that. But putting the policy on a > web page doesn't seem to be working; there are

Re: [Haskell-cafe] Cabal, Time & GHC 6.10.2

2009-05-24 Thread Duncan Coutts
On Sun, 2009-05-24 at 12:04 +0100, Dominic Steinitz wrote: > > I'll add this issue to the FAQ, it come up enough. If anyone else > > reading would like to eliminate this FAQ, then implementing this ticket > > is the answer: > > > > suggest use of --user if configure fails with missing dep

Re: Re: [Haskell-cafe] Re: A problem with par and modules boundaries...

2009-05-23 Thread Duncan Coutts
On Sat, 2009-05-23 at 13:31 -0400, Mario Blažević wrote: > >>> You could probably see exactly what's happening in > >>> more detail by going through the Core output. > >> > >> Thank you, this advice helped. The Core output indicates > >> that function `test' evaluates the arguments to > >> `parall

Re: [Haskell-cafe] A problem with par and modules boundaries...

2009-05-23 Thread Duncan Coutts
On Fri, 2009-05-22 at 16:34 +0200, Daniel Fischer wrote: > > That's great, thank you. I am still baffled, though. I'm baffled too! I don't see the same behaviour at all (see the other email). > > Must every exported function that uses `par' be INLINEd? Does every > > exported caller of such

Re: [Haskell-cafe] A problem with par and modules boundaries...

2009-05-23 Thread Duncan Coutts
On Fri, 2009-05-22 at 05:30 -0700, Don Stewart wrote: > Answer recorded at: > > http://haskell.org/haskellwiki/Performance/Parallel I have to complain, this answer doesn't explain anything. This isn't like straight-line performance, there's no reason as far as I can see that inlining should c

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-22 Thread Duncan Coutts
On Thu, 2009-05-21 at 21:30 -0500, John Goerzen wrote: > Duncan Coutts wrote: > > On Thu, 2009-05-21 at 15:22 -0700, Alexander Dunlap wrote: > >> Since those types come out of the time library, and that library's > >> version *has* been bumped (I assume), couldn&#

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread Duncan Coutts
On Thu, 2009-05-21 at 15:22 -0700, Alexander Dunlap wrote: > Since those types come out of the time library, and that library's > version *has* been bumped (I assume), couldn't you use Cabal to > condition on the version of the time library to determine whether or > not to have CPP set a -DTYPEABLE

Re: [Haskell-cafe] ghc ./configure stalls on docbook DTD

2009-05-21 Thread Duncan Coutts
On Mon, 2009-05-18 at 12:09 +0100, Simon Marlow wrote: > I have the following complaint from Roman in my inbox, which I think is > about the same thing: > > > one big nuisance when building ghc is that configure tries to connect > > to the internet. The culprit is the FP_GEN_DOCBOOK_XML macro

Re: [Haskell-cafe] Cabal, Time & GHC 6.10.2

2009-05-17 Thread Duncan Coutts
On Sun, 2009-05-17 at 09:17 +0100, Dominic Steinitz wrote: > I get > > > d...@linux-6ofq:~/asn1> runghc Setup.hs configure > > Configuring PER-0.0.20... > > Setup.hs: At least the following dependencies are missing: > > time -any && -any > > but I have time > > > d...@linux-6ofq:~/asn1> ghc-pkg

Re: [Haskell-cafe] Data.Binary and little endian encoding

2009-05-15 Thread Duncan Coutts
On Thu, 2009-05-14 at 20:46 -0700, David Leimbach wrote: > > > On Thu, May 14, 2009 at 8:40 PM, Don Stewart wrote: > leimy2k: > > > I actually need little endian encoding... wondering if > anyone else hit this > > with Data.Binary. (because I'm working wi

Re: [Haskell-cafe] Structural sharing in haskell data structures?

2009-05-14 Thread Duncan Coutts
On Thu, 2009-05-14 at 09:03 -0400, Jan-Willem Maessen wrote: > Hmm, I think neither of the data structures you name actually support > both O(lg n) indexing and O(lg n) cons or append. That said, your > point is well taken, so let's instead state it as a challenge: > > Can you, oh Haskellers

Re: Re[2]: The HP and PackedString (was: Re: [Haskell-cafe] Removing mtl from the Haskell Platform)

2009-05-13 Thread Duncan Coutts
On Wed, 2009-05-13 at 15:37 +0400, Bulat Ziganshin wrote: > Hello Duncan, > > Wednesday, May 13, 2009, 3:33:13 PM, you wrote: > > > I think it should remain deprecated and we should work on the > > replacement so that TH can switch its dependency. > > TH isn't high-performance package and i thin

Re: The HP and PackedString (was: Re: [Haskell-cafe] Removing mtl from the Haskell Platform)

2009-05-13 Thread Duncan Coutts
On Wed, 2009-05-13 at 10:24 +0200, Ketil Malde wrote: > Not of the same gravity as mtl, but I was a bit surprised to see that > PackedString was included, in spite of it being marked as deprecated > on Hackage. TemplateHaskell still uses it. There was not a lot we could do for the first release. S

Re: [Haskell-cafe] Removing mtl from the Haskell Platform

2009-05-13 Thread Duncan Coutts
On Wed, 2009-05-13 at 12:01 +0100, Neil Brown wrote: > Sittampalam, Ganesh wrote: > > We've discussed replacing it with transformers+monads-fd+an mtl > > compatiblity layer on librar...@. Ross and I plan to propose doing this > > for the second release of the platform - it's not fair to disrupt the

Re: [Haskell-cafe] runhaskell CLI parameters

2009-05-09 Thread Duncan Coutts
On Tue, 2009-05-05 at 22:39 -0500, Vasili I. Galchin wrote: > Hello, > > I have forgotten the runhaskell CLI parameters ... sigh. In > particular I want to a "local" build of a set of of package: > > runhaskell Setup.hs configure --user??? > > I just did a "runhaskell -?" which did

Re: [Haskell-cafe] cabal parse problems

2009-05-09 Thread Duncan Coutts
On Wed, 2009-05-06 at 19:37 -0500, Vasili I. Galchin wrote: > are them some CLI switches I can enable in order to better determine > what "parse error" is?? The problem is that we're using a parser that has no support for producing parse errors (Text.ParserCombinators.ReadP). The only reason we're

Re: [Haskell-cafe] Question concerning Haskell Foundation

2009-05-09 Thread Duncan Coutts
On Thu, 2009-05-07 at 18:13 -0500, Vasili I. Galchin wrote: > sorry should read "With Haskell Platform" > > 1) Can we still publish/push up packages to Hackage? E.g. now I am > trying to get Graham Lyle's Swish (semantic web package) cabalized. > > 2) Will Hackage go away? Hackage and th

Re: [Haskell-cafe] HDBC 2.1, UTF8 and Umlauts

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 11:19 -0500, John Goerzen wrote: > Guenther Schmidt wrote: > > Hi John, > > > > thanks for taking the time. It actually is \252 that turned into > > something else because of my email client, damn the thing. > > OK, perhaps we have some confusion here. > > Are you saying t

Re: [Haskell-cafe] Estimating the time to garbage collect

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 15:05 +0100, Neil Davies wrote: > Duncan > > That was my first thought - but what I'm looking for is some > confirmation from those who know better that treating the GC as > 'statistical source' is a valid hypothesis. If the thing is 'random' > that's fine - if its timi

Re: [Haskell-cafe] Estimating the time to garbage collect

2009-05-04 Thread Duncan Coutts
On Fri, 2009-05-01 at 09:14 +0100, Neil Davies wrote: > Hi > > With the discussion on threads and priority, and given that (in > Stats.c) there are lots of useful pieces of information that the run > time system is collecting, some of which is already visible (like the > total amount of memo

Re: [Haskell-cafe] When is it OK to create a new mailing list?

2009-05-04 Thread Duncan Coutts
On Mon, 2009-05-04 at 12:51 +0200, Wolfgang Jeltsch wrote: > Am Samstag, 2. Mai 2009 14:11 schrieb Mads Lindstrøm: > > Hi > > > > I wanted a mailing list for my project WxGeneric and I am wondering when > > it is OK to do so? How big must the potential audience be? Is there any > > kind of etiquett

[Haskell-cafe] Re: [Haskell] ANN: Takusen 0.8.4

2009-05-01 Thread Duncan Coutts
On Fri, 2009-05-01 at 16:16 +0100, Alistair Bayley wrote: > ANN: Takusen 0.8.4 > The release bundle: > > http://hackage.haskell.org/packages/archive/Takusen/0.8.4/Takusen-0.8.4.tar.gz > If you have cabal-install, then this command should work: > cabal install Takusen --flags="sqlite odbc or

Re: [Haskell-cafe] What to do when cabal dependencies are not your friend.

2009-05-01 Thread Duncan Coutts
On Fri, 2009-05-01 at 16:55 -0500, Thomas Hartman wrote: > I did a little write-up on an annoyance I frequently have when > developing patch-tag, a happs application that has a lot of > dependencies. > > Basically, on a virgin linux environment with the same cabal and ghc > version as before, a ca

Re: [Haskell-cafe] How to install HOpenGL to Windows?

2009-04-30 Thread Duncan Coutts
On Thu, 2009-04-30 at 23:31 +0100, Claus Reinke wrote: > > The thing is, it doesn't really matter if autoconf macros work fine for > > every Unix ever invented. The Windows users simply cannot use packages > > with configure scripts. They complain about it a lot. We can call them > > foolish for no

Re: [Haskell-cafe] How to install HOpenGL to Windows?

2009-04-30 Thread Duncan Coutts
On Thu, 2009-04-30 at 19:44 +0200, Sven Panne wrote: > That's why the autoconf macros are so tricky. Re-inventing the wheel in > Haskell is not something I'd like to do. Note: I see autoconf as a necessary > evil, not as a glorious tool. The predefined autoconf macros contain man > years > (if

Re: [Haskell-cafe] How to install HOpenGL to Windows?

2009-04-29 Thread Duncan Coutts
On Mon, 2009-04-27 at 19:03 +0200, Sven Panne wrote: > Am Montag, 27. April 2009 00:11:20 schrieb Duncan Coutts: > > On Sun, 2009-04-26 at 19:03 +0200, Sven Panne wrote: > > [...] > > >* How to link programs using OpenGL > > > > This is because the G

Re: [Haskell-cafe] old-time conflict when installing phooey

2009-04-27 Thread Duncan Coutts
On Sun, 2009-04-26 at 21:49 -0700, Daryoush Mehrtash wrote: > > When I try to install phooey I get conflict with old-time that I am > not sure how to resolve. Any ideas? > > > > cabal install phooey > Resolving dependencies... > cabal: dependencies conflict: ghc-6.10.1 requires old-time ==1.0.

Re: [Haskell-cafe] Memory usage of cabal install

2009-04-27 Thread Duncan Coutts
On Mon, 2009-04-27 at 12:56 +0200, Krzysztof Kościuszkiewicz wrote: > Hello Haskell-Café, > > I have a problem with high memory usage of cabal-install. Whenever I > try to install or upgrade a package, cabal manages to consume 1,3G of > memory before I killed it (on a 32-bit machine with 1 GB of

Re: [Haskell-cafe] How to install HOpenGL to Windows?

2009-04-26 Thread Duncan Coutts
On Sun, 2009-04-26 at 19:03 +0200, Sven Panne wrote: > The build process in itself is purely Cabal-based, it is only the > configuration above which done via autoconf. So in theory you could write the > few output files of the configure run by hand and then use Cabal, without any > MinGW/MSYS o

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