Re: [Haskell-cafe] Backpatching

2007-07-31 Thread Derek Elkins
On Tue, 2007-07-31 at 23:04 -0700, Stefan O'Rear wrote: > On Wed, Aug 01, 2007 at 03:44:32PM +1000, Thomas Conway wrote: > > This sounds like a common problem type. Is there a well known solution > > to this sort of problem? > > Mmm... logic programming? > > http://citeseer.ist.psu.edu/claessen00

Re: [Haskell-cafe] Backpatching

2007-07-31 Thread Stefan O'Rear
On Wed, Aug 01, 2007 at 03:44:32PM +1000, Thomas Conway wrote: > This sounds like a common problem type. Is there a well known solution > to this sort of problem? Mmm... logic programming? http://citeseer.ist.psu.edu/claessen00typed.html You'll only need the code for logic-variables, and even th

Re: [Haskell-cafe] OS swapping and haskell data structures

2007-07-31 Thread Stefan O'Rear
On Tue, Jul 31, 2007 at 10:45:56PM -0700, Alex Jacobson wrote: > If you create a Data.Map or Data.Set larger than fits in physical memory, > will OS level swapping enable your app to behave reasonably or will things > just die catastrophically as you hit a memory limit? Data.{Set,Map} uses balan

Re[6]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-31 Thread Bulat Ziganshin
Hello shelarcy, Wednesday, August 1, 2007, 4:03:52 AM, you wrote: >> problems. the only question that remains - does this version supports >> unicode? > Yes. Current darcs repository version support only unicode > enabled version. great, it's all what i need. but i'm still curious about other f

[Haskell-cafe] OS swapping and haskell data structures

2007-07-31 Thread Alex Jacobson
If you create a Data.Map or Data.Set larger than fits in physical memory, will OS level swapping enable your app to behave reasonably or will things just die catastrophically as you hit a memory limit? -Alex- ___ Haskell-Cafe mailing list Haskell-Caf

[Haskell-cafe] Backpatching

2007-07-31 Thread Thomas Conway
Hi All, One of the things I've been working on lately is some ASN.1 stuff.One of the first things I wrote in Haskell was an ASN.1 parser. It only worked for a subset, and I'm revisiting it to make it handle a larger subset. One of the things that gets messy is that in lots of places you can put e

Re: [Haskell-cafe] Re: HDBC or HSQL

2007-07-31 Thread Alex Jacobson
Out of curiosity, can I ask what you are actually trying to do? I am asking because I am trying to make HAppS a reasonable replacement for all contexts in which you would otherwise use an external relational database except those in which an external SQL database is a specific requirement. -

Re: [Haskell-cafe] Newbie question about Haskell skills progress

2007-07-31 Thread Donald Bruce Stewart
bf3: > >Having only a couple of days of practice programming Haskell >(but having read lots of books and docs), I find myself >writing very explicit low level code using inner "aux" >functions (accumulators and loops). Then I force myself to >revise the code, replacing these a

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Donald Bruce Stewart
jgbailey: > I've implemented KMP string searching for lazy bytestrings, and I'd > like some help improving the performance of the code. I'd also like to > know if it doesn't look correct - I've tested it pretty extensively > but you never know ... > > I've been testing on a 7 MB file, where the se

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Matthew Brecknell
Chad Scherrer: > Ok, that looks good, but what if I need some random values elsewhere > in the program? This doesn't return a new generator (and it can't > because you never get to the end of the list). To fix that, just replace the call to getStdGen with a call to newStdGen, as has already been s

Re: [Haskell-cafe] Operational Semantics of Haskell

2007-07-31 Thread Thomas Conway
On 8/1/07, Lewis-Sandy, Darrell <[EMAIL PROTECTED]> wrote: > Is there a good source for the operational semantics of Haskell? I am > trying to squeeze the most efficiency out of a bit of code and am looking to > remove unnecessary reductions. You're kind of asking two questions - the first you as

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Duncan Coutts
On Wed, 2007-08-01 at 02:30 +0100, Tim Docker wrote: > > If anyone can come up with a fast search implementation for strict > > and/or lazy ByteStrings I'll include it in the bytestring package. > > Out of curiosity, is it intentional or an oversight that findSubstrings > is only implemented on st

Re: [Haskell-cafe] Operational Semantics of Haskell

2007-07-31 Thread Donald Bruce Stewart
darrelll: > >Is there a good source for the operational semantics of >Haskell? I am trying to squeeze the most efficiency out of >a bit of code and am looking to remove unnecessary >reductions. The best thing is to look at the tricks on the performance wiki, http://haskell.o

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Donald Bruce Stewart
twd_gg: > > If anyone can come up with a fast search implementation for strict > > and/or lazy ByteStrings I'll include it in the bytestring package. > > Out of curiosity, is it intentional or an oversight that findSubstrings > is only implemented on strict ByteStrings? (at least with the libs > s

[Haskell-cafe] Re: Newbie question about Haskell skills progress

2007-07-31 Thread Benjamin Franksen
peterv wrote: > Having only a couple of days of practice programming Haskell (but having > read lots of books and docs), I find myself writing very explicit low level > code using inner "aux" functions (accumulators and loops). Then I force > myself to revise the code, replacing these aux function

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Tim Docker
> If anyone can come up with a fast search implementation for strict > and/or lazy ByteStrings I'll include it in the bytestring package. Out of curiosity, is it intentional or an oversight that findSubstrings is only implemented on strict ByteStrings? (at least with the libs supplied with ghc-6.6

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Duncan Coutts
On Wed, 2007-08-01 at 01:51 +0100, Tim Docker wrote: > Now I wonder what that 7MB file might be? :-) > > We (team TNT) implemented KMP over lazy bytestrings as part of our icfp > 2007 contest entry. As I remember, for the DNA evaluator it gave modest > speed improvements over more naïve searching.

Re: [Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Tim Docker
Now I wonder what that 7MB file might be? :-) We (team TNT) implemented KMP over lazy bytestrings as part of our icfp 2007 contest entry. As I remember, for the DNA evaluator it gave modest speed improvements over more naïve searching. Our implementation was based upon this blog post: http://

Fwd: Re: Re[4]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-31 Thread shelarcy
Oops, I made mistake to send this mail only for Bulat. --- Forwarded message --- From: shelarcy <[EMAIL PROTECTED]> To: "Bulat Ziganshin" <[EMAIL PROTECTED]> Subject: Re: Re[4]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows Date: Wed, 01 Aug 2007 09:03:52 +0900 Hello

Re: [Haskell-cafe] Re: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-31 Thread David Roundy
On Tue, Jul 31, 2007 at 04:04:17PM -0700, Stefan O'Rear wrote: > On Tue, Jul 31, 2007 at 03:31:54PM -0700, David Roundy wrote: > > On Mon, Jul 30, 2007 at 11:47:46AM +0100, Jon Fairbairn wrote: > > > ChrisK <[EMAIL PROTECTED]> writes: > > > > > > > And the readability is destroyed because you cann

Re: [Haskell-cafe] Re: HDBC or HSQL

2007-07-31 Thread david48
On 7/30/07, John Goerzen <[EMAIL PROTECTED]> wrote: > On 2007-07-25, david48 <[EMAIL PROTECTED]> wrote: > > HDBC Supports Mysql only through ODBC :( > This is true, unless some MySQL hacker would like to contribute a native > module. I don't use MySQL myself and haven't had the time to write an

Re: [Haskell-cafe] Re: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-31 Thread Stefan O'Rear
On Tue, Jul 31, 2007 at 03:31:54PM -0700, David Roundy wrote: > On Mon, Jul 30, 2007 at 11:47:46AM +0100, Jon Fairbairn wrote: > > ChrisK <[EMAIL PROTECTED]> writes: > > > > > And the readability is destroyed because you cannot do any type inference > > > in > > > your head. > > > > > > If you s

Re: [Haskell-cafe] Exiting GLUT application

2007-07-31 Thread Dave Tapley
Excellent, thank you Marc your advice worked perfectly. For reference the corrected code reads: > import Graphics.UI.GLUT > main = do > getArgsAndInitialize > createWindow "" > actionOnWindowClose $= ContinueExectuion > mainLoop Dave, On 31/07/07, Marc A. Ziegert <[EMAIL PROTECTED]> wrote: > i

Re: [Haskell-cafe] Re: [Haskell] View patterns in GHC: Request?for?feedback

2007-07-31 Thread David Roundy
On Mon, Jul 30, 2007 at 11:47:46AM +0100, Jon Fairbairn wrote: > ChrisK <[EMAIL PROTECTED]> writes: > > > And the readability is destroyed because you cannot do any type inference in > > your head. > > > > If you see > > > > { > > Matrix m = ; > > Matrix x = m * y; > > ...; > > } > > > >

Re: [Haskell-cafe] Exiting GLUT application

2007-07-31 Thread Marc A. Ziegert
in old glut, the main loop was the core of the single threaded program. exiting it did mean to exit the program completely. in freeglut, you have alternatives. but for compatibility, it defaults to the old behaviour.

Re[2]: [Haskell-cafe] Newbie question about automatic memoization

2007-07-31 Thread Bulat Ziganshin
Hello peterv, Tuesday, July 31, 2007, 11:06:23 PM, you wrote: it is property of explicit *name* given to result of some expression. for example, when you write f x = g (x*x) (x*x) result of x*x isn't stored because it may be very large and compiler exactly follows your instruction - "calculate

Re: [Haskell-cafe] problem building lambdabot

2007-07-31 Thread Stefan O'Rear
On Tue, Jul 31, 2007 at 04:46:30PM -0400, Thomas Hartman wrote: > Can anybody shout out about the latest version of ghc compatible with > building lambdabot? > > http://www.cse.unsw.edu.au/~dons/lambdabot.html > > shows it working on 6.4.1. > > can it build under anything more recent? It work

Re: [Haskell-cafe] problem building lambdabot

2007-07-31 Thread Michael Vanier
Stefan just got it working yesterday with ghc 6.6.1 and sent me the patch. I imagine it'll be in the darcs repo soon if it isn't already. Mike Thomas Hartman wrote: Can anybody shout out about the latest version of ghc compatible with building lambdabot? http://www.cse.unsw.edu.au/~dons/l

Re: [Haskell-cafe] problem building lambdabot

2007-07-31 Thread Thomas Hartman
Can anybody shout out about the latest version of ghc compatible with building lambdabot? http://www.cse.unsw.edu.au/~dons/lambdabot.html shows it working on 6.4.1. can it build under anything more recent? t. "Stefan O'Rear" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/30/2007 11:59

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Lennart Augustsson
Well, I don't know how many generators you need. But I'm sure you can pass them around in a way that doesn't leak. On 7/31/07, Chad Scherrer <[EMAIL PROTECTED]> wrote: > > Ok, that looks good, but what if I need some random values elsewhere > in the program? This doesn't return a new generator (a

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Chad Scherrer
On 7/31/07, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote: > > On Jul 31, 2007, at 16:20 , Chad Scherrer wrote: > > > calls. I suppose a State' monad, strict in the state, could help here. > > You mean Control.Monad.State.Strict ? Umm, yeah, I guess I do. Glad I hadn't started recoding it! __

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Brandon S. Allbery KF8NH
On Jul 31, 2007, at 16:20 , Chad Scherrer wrote: calls. I suppose a State' monad, strict in the state, could help here. You mean Control.Monad.State.Strict ? -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAI

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Chad Scherrer
Ok, that looks good, but what if I need some random values elsewhere in the program? This doesn't return a new generator (and it can't because you never get to the end of the list). Without using IO or ST, you'd have to thread the parameter by hand or use the State monad, right? This is where I was

Re: [Haskell-cafe] infinite list of random elements

2007-07-31 Thread Lennart Augustsson
No leak in sight. -- Lennart import Random import Array randomElts :: RandomGen g => g -> [a] -> [a] randomElts _ [] = [] randomElts g xs = map (a!) rs where a = listArray (1, n) xs rs = randomRs (1, n) g n = length xs main = do g <- getStdGen let xs = randomElts g [10

Re: [Haskell-cafe] curious hxt error

2007-07-31 Thread Albert Y. C. Lai
brad clawsie wrote: i am having a problem with hxt, i was wondering if anyone here has experience with it. in particular, i find that the xread function chokes on xml files with xml declarations, and i am not sure why. [...] This is intended. Generally, wherever the HXT manual says "content" (

[Haskell-cafe] Knuth Morris Pratt for Lazy Bytestrings implementation

2007-07-31 Thread Justin Bailey
I've implemented KMP string searching for lazy bytestrings, and I'd like some help improving the performance of the code. I'd also like to know if it doesn't look correct - I've tested it pretty extensively but you never know ... I've been testing on a 7 MB file, where the search sequence is not f

Re: [Haskell-cafe] Newbie question about Haskell skills progress

2007-07-31 Thread Dougal Stanton
On 31/07/07, peterv <[EMAIL PROTECTED]> wrote: > > > > > Having only a couple of days of practice programming Haskell (but having > read lots of books and docs), I find myself writing very explicit low level > code using inner "aux" functions (accumulators and loops). Then I force > myself to revi

RE: [Haskell-cafe] Newbie question about automatic memoization

2007-07-31 Thread peterv
Thanks! Is this is also the case when using let and where, or is this just syntactic sugar? -Original Message- From: Jules Bean [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 5:09 PM To: Bryan Burgers Cc: peterv; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Newbie question

[Haskell-cafe] Newbie question about Haskell skills progress

2007-07-31 Thread peterv
Having only a couple of days of practice programming Haskell (but having read lots of books and docs), I find myself writing very explicit low level code using inner "aux" functions (accumulators and loops). Then I force myself to revise the code, replacing these aux functions with suitable higher

Re: [Haskell-cafe] problem implementing an EDSL in Haskell

2007-07-31 Thread Conal Elliott
Hi Daniil, oops -- i just noticed this response from you from weeks ago. i'm guessing your question is all resolved for you by now. if not, please say so. cheers, - Conal On 6/25/07, Daniil Elovkov <[EMAIL PROTECTED]> wrote: > > Hi Conal > > 2007/6/24, Conal Elliott <[EMAIL PROTECTED]>: > > B

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread brad clawsie
> The problem with generating one of those is what manages it? What > package would it belong to etc. the same package that provides us with our interactive hackage prompt rebuilding a central index will be a logical post-process for the installation function _

RE: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread Chris Smith
Duncan Coutts <[EMAIL PROTECTED]> wrote: > What is missing from the local docs is a single integrated index page > that lists all the modules and then links off to the various packages's > docs like we have on the ghc website. > > The problem with generating one of those is what manages it? What >

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 47, Issue 237

2007-07-31 Thread Chad Scherrer
Maybe I'm going about this the wrong way, but using the State monad for random numbers was always leaky for me. Any time I use it, I have to go through and strategically place "seq"s to counter the excessive laziness. IO and ST have worked well, and seem to be faster as well (though that's purely s

[Haskell-cafe] Exiting GLUT application

2007-07-31 Thread Dave Tapley
Hi everyone, I have the following skeleton GLUT code: > import Graphics.UI.GLUT > main = do > getArgsAndInitialize > createWindow "" > mainLoop It loads into both hugs and ghci fine and when 'main' is evaluated an empty window opens as expected. However when closing the window (clicki

RE: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread Duncan Coutts
On Tue, 2007-07-31 at 17:26 +0100, Simon Peyton-Jones wrote: > | I see it as a really big deal that documentation becomes fragmented when > | one is using many packages, so that it's harder to find what you want. > | In fact, I'd classify that as the single biggest reason that I don't use > | many

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread Stefan O'Rear
On Tue, Jul 31, 2007 at 05:26:31PM +0100, Simon Peyton-Jones wrote: > | I see it as a really big deal that documentation becomes fragmented when > | one is using many packages, so that it's harder to find what you want. > | In fact, I'd classify that as the single biggest reason that I don't use >

RE: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread Simon Peyton-Jones
| I see it as a really big deal that documentation becomes fragmented when | one is using many packages, so that it's harder to find what you want. | In fact, I'd classify that as the single biggest reason that I don't use | many packages now When you install packages A,B,C, the documentation for

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread brad clawsie
On Tue, Jul 31, 2007 at 09:16:33AM -0600, Chris Smith wrote: > If there could be built-in quality control in promoting certain > packages, that would be great. it needs to be more fine grained. a new version of a package may indeed rollback some positive attributes (stability for example) that a

Re: [Haskell-cafe] Operational Semantics of Haskell

2007-07-31 Thread Neil Mitchell
Hi > Is there a good source for the operational semantics of Haskell? I am > trying to squeeze the most efficiency out of a bit of code and am looking to > remove unnecessary reductions. You probably aren't after operational semantics - the compiler takes your code and optimises it to something

[Haskell-cafe] RE: Definition of the Haskell standard library

2007-07-31 Thread Chris Smith
> On Tue, 2007-07-31 at 10:15 +0100, Simon Peyton-Jones wrote: > > - Package X is "blessed"; lots of people have argued over its design, > > it's stable, widely used, and actively maintained. Changes to this > > package goes through a quality-control process. > > Then, in effect, the "standard li

Re: [Haskell-cafe] Newbie question about automatic memoization

2007-07-31 Thread Jules Bean
Bryan Burgers wrote: On 7/30/07, peterv <[EMAIL PROTECTED]> wrote: Does Haskell support any form of automatic memorization? For example, does the function iterate f x which expands to [x, f(x), f(f(x)), f(f(f(x))), … gets slower and slower each iteration, or can it take adva

[Haskell-cafe] Operational Semantics of Haskell

2007-07-31 Thread Lewis-Sandy, Darrell
Is there a good source for the operational semantics of Haskell? I am trying to squeeze the most efficiency out of a bit of code and am looking to remove unnecessary reductions. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell

Re: [Haskell-cafe] RLE in Haskell: why does the type variable get instantiated?

2007-07-31 Thread Pekka Karjalainen
On 7/31/07, Chris Eidhof <[EMAIL PROTECTED]> wrote: > Hey Haskell-Cafe, > > I was trying out the code in Dons's article [1], and I noticed a > weird thing when doing it in GHCi. When binding the function > composition to a variable, the type suddenly changes. I'm not > completely sure why this happ

Re: [Haskell-cafe] Re: Conditional compilation of Setup.hs

2007-07-31 Thread Duncan Coutts
On Tue, 2007-07-31 at 17:20 +0400, Bulat Ziganshin wrote: > Hello Duncan, > > Tuesday, July 31, 2007, 5:06:35 PM, you wrote: > > >> #ifdef __CABAL_VERSION__ > 117 > >> > >> Is something like this possible with Cabal? > > > No, Cabal does not define any cpp defines like that. > > фафшкб one of t

[Haskell-cafe] Re: Definition of the Haskell standard library

2007-07-31 Thread Simon Marlow
Chris Smith wrote: Can someone clarify what's going on with the standard library in Haskell? As of right now, I can download, say, GHC from haskell.org/ghc and get a set of libraries with it. I can visit http://haskell.org/ghc/docs/latest/html/libraries/, linked from the haskell.org home pa

Re: [Haskell-cafe] Re: Conditional compilation of Setup.hs

2007-07-31 Thread Bulat Ziganshin
Hello Duncan, Tuesday, July 31, 2007, 5:06:35 PM, you wrote: >> #ifdef __CABAL_VERSION__ > 117 >> >> Is something like this possible with Cabal? > No, Cabal does not define any cpp defines like that. фафшкб one of this year GSOC projects is "Cabal sections" impelementation which should allow to

RE: [Haskell-cafe] Definition of the Haskell standard library

2007-07-31 Thread Duncan Coutts
On Tue, 2007-07-31 at 10:15 +0100, Simon Peyton-Jones wrote: > All true, but not so helpful for Joe User. For Joe, I think it might > be helpful to have some easily-discoverable notion of which package > quality and stability. > > - Package X is "blessed"; lots of people have argued over its des

[Haskell-cafe] Re: Conditional compilation of Setup.hs

2007-07-31 Thread Duncan Coutts
On Tue, 2007-07-31 at 13:46 +0100, Bayley, Alistair wrote: > I'd like to add a #ifdef to Takusen's Setup.hs, so that we can have a > single source file that will compile with ghc-6.6 and ghc-6.6.1. With > ghc-6.6 and Cabal-1.1.6.1 we use splitFileName and joinPaths from > Distribution.Compat.FilePa

[Haskell-cafe] Conditional compilation of Setup.hs

2007-07-31 Thread Bayley, Alistair
I'd like to add a #ifdef to Takusen's Setup.hs, so that we can have a single source file that will compile with ghc-6.6 and ghc-6.6.1. With ghc-6.6 and Cabal-1.1.6.1 we use splitFileName and joinPaths from Distribution.Compat.FilePath. With ghc-6.6.1 (which includes Cabal-1.1.6.2) these have been m

Re: [Haskell-cafe] RLE in Haskell: why does the type variable get instantiated?

2007-07-31 Thread Arthur van Leeuwen
On 31-jul-2007, at 11:38, Chris Eidhof wrote: Hey Haskell-Cafe, I was trying out the code in Dons's article [1], and I noticed a weird thing when doing it in GHCi. When binding the function composition to a variable, the type suddenly changes. I'm not completely sure why this happens. Is

Re: [Haskell-cafe] Re: RLE in Haskell: why does the type variable get instantiated?

2007-07-31 Thread Brandon S. Allbery KF8NH
On Jul 31, 2007, at 6:00 , apfelmus wrote: Chris Eidhof wrote: When binding the function composition to a variable, the type suddenly changes. Prelude Control.Arrow List> :t map (length &&& head) . group map (length &&& head) . group :: (Eq a) => [a] -> [(Int, a)] Prelude Control.Arrow List>

Re: [Haskell-cafe] HDBC Laziness (was Re: HDBC or HSQL)

2007-07-31 Thread Henk-Jan van Tuyl
On Mon, 30 Jul 2007 00:56:30 +0200, John Goerzen <[EMAIL PROTECTED]> wrote: I have heard from a number of people that this behavior is not very newbie-friendly. I can see how that is true. I have an API revision coming anyway, so perhaps this is the time to referse the default laziness of HD

Re: [Haskell-cafe] Definition of the Haskell standard library

2007-07-31 Thread Lutz Donnerhacke
* Simon Peyton-Jones wrote: > Then, in effect, the "standard library" is all the X packages. I wonder > if it'd help to have some descriptions such as those above (better > worded), and use them? Cabal already has a "stability" indication, and > that might serve, but we'd want to articulate much

[Haskell-cafe] Re: RLE in Haskell: why does the type variable get instantiated?

2007-07-31 Thread apfelmus
Chris Eidhof wrote: > When binding the function composition to a variable, the type > suddenly changes. > > Prelude Control.Arrow List> :t map (length &&& head) . group > map (length &&& head) . group :: (Eq a) => [a] -> [(Int, a)] > Prelude Control.Arrow List> let encode = map (length &&& head) .

[Haskell-cafe] RLE in Haskell: why does the type variable get instantiated?

2007-07-31 Thread Chris Eidhof
Hey Haskell-Cafe, I was trying out the code in Dons's article [1], and I noticed a weird thing when doing it in GHCi. When binding the function composition to a variable, the type suddenly changes. I'm not completely sure why this happens. Is this because GHCi is in a monad and wants to f

RE: [Haskell-cafe] Definition of the Haskell standard library

2007-07-31 Thread Simon Peyton-Jones
| On the other hand, it's not entirely true that there's no standard | library, it's just that it's borders are slightly fuzzy. For example, we | do have the library change submission process for modifying the standard | libraries. Up until now that has been taken to mean changes to the base | pack

[Haskell-cafe] Re: infinite list of random elements

2007-07-31 Thread apfelmus
Chad Scherrer wrote: > I prefer the purely functional approach as well, but I've > been bitten several times by laziness causing space leaks in this > context. I'm on a bit of a time crunch for this, so I avoided the > risk. Well, space leaks won't magically disappear if you use IO a . Regards,