Re: [GHC] #1287: SPECIALIZE causes panic

2007-05-11 Thread GHC
#1287: SPECIALIZE causes panic --+- Reporter: [EMAIL PROTECTED] |Owner: igloo Type: bug| Status: new Priority: normal |Milestone:

RE: {-# INLINE me_harder #-}

2007-05-11 Thread Simon Peyton-Jones
Duncan I've been meaning to reply to this. It's very difficult to get inlining right all the time. Even for a function marked INLINE, there's really no point in inlining in some contexts. E.g. map f xs (don't inline f). Furthermore, for parameter-less things like 'word8' GHC has to

Re: GHC as a library - getting output from GHCI

2007-05-11 Thread Simon Marlow
Matthew Danish wrote: On Thu, May 10, 2007 at 09:34:53AM +0100, Simon Marlow wrote: And we do have support for this in GHC. $ ghci ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | |GHC Interactive, version 6.7, for Haskell 98. / /_\\/ __ / /___| |

Re: ghc-6.6.1 under i386 Solaris

2007-05-11 Thread Christian Maeder
Christian Maeder schrieb: ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_| Type :? for help. [New LWP 3] Loading package base ... linking

RE: More speed please!

2007-05-11 Thread Simon Peyton-Jones
| I'm replying to a rather old thread here, about unboxing in functions. Duncan | had a continuation monad which passed around some data type that would be nice | to unbox. You discussed strictness annotations in function types as a potential | solution. I have a different tack on the problem

Re: GHC 6.6.1 Windows installer, test version

2007-05-11 Thread Simon Marlow
Simon Marlow wrote: shelarcy wrote: Hi On Thu, 10 May 2007 18:36:22 +0900, Neil Mitchell [EMAIL PROTECTED] wrote: I've attached the installer source to this message, for you to play with/patch to your hearts content. I sent a copy to Ian a few days, so it should be appearing in the GHC tree

Re: More speed please!

2007-05-11 Thread Josef Svenningsson
On 5/11/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: | I'm replying to a rather old thread here, about unboxing in functions. Duncan | had a continuation monad which passed around some data type that would be nice | to unbox. You discussed strictness annotations in function types as a

Re: GHC 6.6.1 Windows installer, test version

2007-05-11 Thread Neil Mitchell
Hi Ok, I'm building a new tarball with GLUT and C++. The OpenAL/ALUT stuff looks a bit daunting at the moment. If someone tells me exactly what I need to install to make it work, then I'll do that. This tarball has GLUT and C++:

Re: {-# INLINE me_harder #-}

2007-05-11 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Peyton-Jones wrote: It's very difficult to get inlining right all the time. Even for a function marked INLINE, there's really no point in inlining in some contexts. E.g. map f xs (don't inline f). Would it make sense to

Re: Sparc/Intel Solaris support

2007-05-11 Thread Joel Reymont
Christian, On May 10, 2007, at 11:36 AM, Christian Maeder wrote: work well under Solaris 10 for us. I'm in the process of making distributions for ghc-6.6.1. Where do you install ghc on Solaris 10? I have /opt/csw, should I just move the tree there and adjust my path? Thanks,

Re: ghc-6.6.1 win32 msi available

2007-05-11 Thread Ian Lynagh
On Tue, May 08, 2007 at 03:25:31PM -0700, Sigbjorn Finne wrote: In case anyone's interested, http://www.galois.com/~sof/msi/ghc-6-6-1.msi contains a Windows installer for 6.6.1; Thanks Sigbjorne, I've added it to the download page! Ian ___

Re: GHC 6.6.1 Windows installer, test version

2007-05-11 Thread shelarcy
Hi. On Sat, 12 May 2007 00:44:15 +0900, Neil Mitchell [EMAIL PROTECTED] wrote: Ok, I'm building a new tarball with GLUT and C++. The OpenAL/ALUT stuff looks a bit daunting at the moment. If someone tells me exactly what I need to install to make it work, then I'll do that. OK, I

[Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Dirk Kleeblatt
Hi everybody, we're pleased to announce the first release of Harpy. Harpy is a library for run-time code generation of x86 machine code. It provides not only a low level interface to code generation operations, but also a convenient domain specific language for machine code fragments, a

Re: [Haskell] Newbie help with type-classes

2007-05-11 Thread Bas van Dijk
Add: -fallow-overlapping-instances to your OPTIONS pragma and read about overlapping instances in the GHC User Guide: http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#instance-overlap regards, Bas van Dijk On 5/11/07, Ryan Ingram [EMAIL PROTECTED] wrote: Here's a

Re: [Haskell] Newbie help with type-classes

2007-05-11 Thread Bas van Dijk
Maybe this is not what you want, but you can also put the 'convl' function in the 'ConvertToInt' class. class ConvertToInt a where conv :: a - Int convl :: [a] - [Int] With this approach you don't need any language extension. regards, Bas van Dijk On 5/11/07, Ryan Ingram [EMAIL

Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Bas van Dijk
Very nice! Regarding the use of labels, did you consider using circular programming with recursive do to define and reference labels like in: Russell O'Connor, Assembly: Circular Programming with Recursive do http://haskell.org/sitewiki/images/1/14/TMR-Issue6.pdf The advantage of that

Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Dirk Kleeblatt
Bas van Dijk wrote: Regarding the use of labels, did you consider using circular programming with recursive do to define and reference labels like in: Russell O'Connor, Assembly: Circular Programming with Recursive do http://haskell.org/sitewiki/images/1/14/TMR-Issue6.pdf Yes, we considered

Re: [Haskell] Newbie help with type-classes

2007-05-11 Thread Derek Elkins
Ryan Ingram wrote: [EMAIL PROTECTED] is better for this type of question. Follow-up is set to it. Here's a test case for the problem I'm having; I'm using runhaskell from ghc v6.6. Problem #1) Without -fallow-undecidable-instances, I get the following error: Constraint is no smaller

[Haskell] Functional Programming School + PhD workshop, June 23-30, 2007

2007-05-11 Thread HORVATH Zoltan
2nd Central-European Functional Programming School CEFP 2007 Cluj-Napoca, June 23-30, 2007 http://cs.ubbcluj.ro/cefp2007/ Second Call for PhD student presentation - Call for participation PhD students are invited to submit the

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-11 Thread Jules Bean
[If I sound definitive below, it's because I am stating facts; but they are facts about the community of mathematicians and computer scientists I have interacted with in person. I'm sure other physically-connected communities have adopted different conventions] Dan Piponi wrote: A more

[Haskell-cafe] Problem with finalizers

2007-05-11 Thread Ivan Tomac
Why does the finalizer in the following code never get called unless I explicitly call finalizeForeignPtr fptr? Even adding System.Mem.performGC made no difference. The code was compiled with ghc --make -fffi -fvia-c Test.hs Ivan Test.hs module

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Joe Thornber
On 11/05/07, Andrew Coppin [EMAIL PROTECTED] wrote: Hi folks. How difficult would it be to implement Mathematica in Haskell? The language itself; very easy I'd say. The maths libraries ... years. So if you just want something to play with I'm sure you could get something working quickly.

[Haskell-cafe] Mathematica

2007-05-11 Thread Andrew Coppin
Hi folks. How difficult would it be to implement Mathematica in Haskell? I mean, I really like Mathematica, but it costs over £2,000. I can't really afford to pay that much for something that's only really a toy. (It's not like a *need* it for anything, I just like playing with it.)

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Duncan Coutts
On Fri, 2007-05-11 at 10:04 +0200, Dirk Kleeblatt wrote: Hi everybody, we're pleased to announce the first release of Harpy. Harpy is a library for run-time code generation of x86 machine code. It provides not only a low level interface to code generation operations, but also a convenient

[Haskell-cafe] Limits of deduction

2007-05-11 Thread Andrew Coppin
Suppose I have you the source code to some arbitrary function that takes a list and returns another list. It is possible to determine whether the function always examins the entire input list? Or would that be equivilent to solving the Halting Problem? (Last time I checked, the Halting

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Dirk Kleeblatt
Hi Duncan, Duncan Coutts schrieb: I was wondering what the need for ensureBufferSize is? Could this by automated? I would have thought that we could just check this when writing out a single instruction. Yes, of course, this would be possible. The only reason is a performance improvement

Re: [Haskell-cafe] Limits of deduction

2007-05-11 Thread Rodrigo Queiro
I think it might be impossible. For the function: sumFirst n = sum . take n then for any finite list, we can choose an n large enough that it will examine the whole list, even though the function is able to stop. This means the only way to check is to call it with an infinite list and see if it

Re: [Haskell-cafe] Limits of deduction

2007-05-11 Thread Duncan Coutts
On Fri, 2007-05-11 at 12:10 +0100, Andrew Coppin wrote: Suppose I have you the source code to some arbitrary function that takes a list and returns another list. It is possible to determine whether the function always examins the entire input list? Presumably you mean in the case that you

Re: [Haskell-cafe] Problem with finalizers

2007-05-11 Thread Neil Davies
Ivan If I remember correctly there is a caveat in the documentation that stdin/stdout could be closed when the finalizer is called. So It may be being called - you just can see it! Neil On 11/05/07, Ivan Tomac [EMAIL PROTECTED] wrote: Why does the finalizer in the following code never get

Re: [Haskell-cafe] Problem with finalizers

2007-05-11 Thread Ivan Tomac
Hi Neil, I've read about that but I thought that was only the case when using finalizers written in Haskell, not in C. Also, even when I remove the call to printf and replace it with an infinite loop or a piece of code that creates a file it doesn't seem to make any difference, the

Re: [Haskell-cafe] Limits of deduction

2007-05-11 Thread Andrew Coppin
It is possible to determine whether the function always examins the entire input list? Presumably you mean in the case that you examine the entire output list, or do you mean when you only examine the output enough to see if it's a [] or (:) (i.e. to WHNF) ? f1 [] = [] f1 (x:xs) =

[Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Henning Thielemann
I want to parse and process HTML lazily. I use HXT because the HTML parser is very liberal. However it uses Parsec and is thus strict. HaXML has a so called lazy parser, but it is not what I consider lazy: *Text.XML.HaXml.Html.ParseLazy Text.XML.HaXml.Pretty.document $ htmlParse text $

Re: [Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Henning Thielemann
On Fri, 11 May 2007, Neil Mitchell wrote: Depending on exactly what you want, TagSoup may be of interest to you. It is lazy, but it doesn't return a tree. It is very tollerant of errors, and will simply never fail to parse something. http://www-users.cs.york.ac.uk/~ndm/tagsoup/ That's an

Re: [Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Neil Mitchell
Hi That's an interesting option. It could be used as a lexer for a full-blown HTML parser. Sometimes I need the tree structure. But why does this simple piece of code needs -fglasgow-exts? It doesn't. The released version 0.1 doesn't require extensions, and the next 0.2 won't either. In the

Re: [Haskell-cafe] Limits of deduction

2007-05-11 Thread Jules Bean
Andrew Coppin wrote: There are many possible variations - length examines the whole list, but not the elements *in* the list. null does less than that. And so on. I'm sure there are many possible combinations. What I'm wondering is if it's possible to algorithmically decide which class of

Re: [Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Jules Bean
Henning Thielemann wrote: I want to parse and process HTML lazily. I use HXT because the HTML parser is very liberal. However it uses Parsec and is thus strict. HaXML has a so called lazy parser, but it is not what I consider lazy: *Text.XML.HaXml.Html.ParseLazy Text.XML.HaXml.Pretty.document $

Re: [Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Henning Thielemann
On Fri, 11 May 2007, Jules Bean wrote: Henning Thielemann wrote: I want to parse and process HTML lazily. I use HXT because the HTML parser is very liberal. However it uses Parsec and is thus strict. HaXML has a so called lazy parser, but it is not what I consider lazy:

Re: [Haskell-cafe] Problem with finalizers

2007-05-11 Thread Ivan Tomac
It appears that if I add import Control.Concurrent and call yield just after performGC then the finalizer does get called. But it only seems to work if I call both performGC and yield and in that order. Is this normal and if so is it documented anywhere? Can this behavior be relied upon in

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Henning Thielemann
On Fri, 11 May 2007, Joe Thornber wrote: On 11/05/07, Andrew Coppin [EMAIL PROTECTED] wrote: Hi folks. How difficult would it be to implement Mathematica in Haskell? The language itself; very easy I'd say. The maths libraries ... years. So if you just want something to play with I'm

Re: [Haskell-cafe] Disadvantages of de Bruijn indicies?

2007-05-11 Thread Stefan O'Rear
On Fri, May 11, 2007 at 03:10:42PM +0100, Neil Mitchell wrote: Hi, de Bruijn indicies look quite nice, and seem to eliminate a lot of complexity when dealing with free variables: http://en.wikipedia.org/wiki/De_Bruijn_index So I was wondering, are they suitable for use in a compiler? If

[Haskell-cafe] Disadvantages of de Bruijn indicies?

2007-05-11 Thread Neil Mitchell
Hi, de Bruijn indicies look quite nice, and seem to eliminate a lot of complexity when dealing with free variables: http://en.wikipedia.org/wiki/De_Bruijn_index So I was wondering, are they suitable for use in a compiler? If so, what are their disadvantages/advantages? Is there any particular

Re: [Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

2007-05-11 Thread Malcolm Wallace
Henning Thielemann [EMAIL PROTECTED] wrote: HaXml has a so called lazy parser, but it is not what I consider lazy: Lazy parsing is rather subtle, and it is easy to write a too-strict parser when one intended to be more lazy. Equally, it can be easy to imagine that the parser is too strict,

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Justin Bailey
On 5/11/07, Dirk Kleeblatt [EMAIL PROTECTED] wrote: Hi everybody, we're pleased to announce the first release of Harpy. Harpy is a library for run-time code generation of x86 machine code. It provides not only a low level interface to code generation operations, but also a convenient domain

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Dirk Kleeblatt
Justin Bailey wrote: On 5/11/07, *Dirk Kleeblatt* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: we're pleased to announce the first release of Harpy. Impressive. Does the library require that an assembler ( e.g. MASM) be installed? No, it doesn't, it's doing all the dirty stuff

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Duncan Coutts
On Fri, 2007-05-11 at 08:58 -0700, Justin Bailey wrote: On 5/11/07, Dirk Kleeblatt [EMAIL PROTECTED] wrote: Hi everybody, we're pleased to announce the first release of Harpy. Harpy is a library for run-time code generation of x86 machine

[Haskell-cafe] Re: Mathematica

2007-05-11 Thread Rene de Visser
How difficult would it be to implement Mathematica in Haskell? Why don't you use axiom? It already has several 100 of years man effort put into it. Or for dynamically type package you could use Maxima. Both are free. Rene. ___ Haskell-Cafe

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Dan Piponi
There are two aspects to mathematica. There's the core language and there is the library of functions made available to the user. The library is many lifetimes of work so don't even think about doing more than a fraction of a percent of it on your own! The core language is more straightforward

Re: [Haskell-cafe] Disadvantages of de Bruijn indicies?

2007-05-11 Thread Claus Reinke
de Bruijn indicies look quite nice, and seem to eliminate a lot of complexity when dealing with free variables: http://en.wikipedia.org/wiki/De_Bruijn_index the complexity is not really eliminated, but made precise and mechanised, which is helpful for tools, less helpful for humans. From what

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Andrew Coppin
How difficult would it be to implement Mathematica in Haskell? OK, you'll be glad to know I wasn't entirely serious when I wrote that. ;-) There are 4 conceptually seperate aspects to Mathematica. - First, there is the absurdly efficient arbitrary precision number crunching engine. It can

[Haskell-cafe] Re: Higher order types via the Curry-Howard correspondence

2007-05-11 Thread DavidA
Gaal Yahas gaal at forum2.org writes: What do higher-order types like lists mean when viewed through the Curry-Howard correspondence? Okay well I don't know the complete answer, but since no one else has answered I'll have a go. Suppose we define our own version of list as data List a =

Re: [Haskell-cafe] Higher order types via the Curry-Howard correspondence

2007-05-11 Thread Benja Fallenstein
Adding some thoughts to what David said (although I don't understand the issues deeply enough to be sure that these ideas don't lead to ugly things like paradoxes)-- 2007/5/10, Gaal Yahas [EMAIL PROTECTED]: Since the empty list inhabits the type [b], this theorem is trivially a tautology, so

[Haskell-cafe] Recent content is available under a simple permissive license

2007-05-11 Thread Robin Green
The Haskell wiki[1] says Recent content is available under a simple permissive license. But this is unilluminating - recent? how recent, exactly? - and will become increasingly understated as time goes by. Wouldn't it be slightly more helpful to say Content added after ... /MM/DD ... is

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Dan Piponi
On 5/11/07, Andrew Coppin [EMAIL PROTECTED] wrote: It seems it would be a fairly difficult task to implement the pattern matching engine properly. Not 'difficult' as in nobody ought to try this in Haskell but 'difficult' as in it seems like a task well suited to Haskell, would be worth the

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread Andrew Coppin
Dan Piponi wrote: On 5/11/07, Andrew Coppin [EMAIL PROTECTED] wrote: It seems it would be a fairly difficult task to implement the pattern matching engine properly. Not 'difficult' as in nobody ought to try this in Haskell but 'difficult' as in it seems like a task well suited to Haskell,

Re: [Haskell-cafe] Disadvantages of de Bruijn indicies?

2007-05-11 Thread Twan van Laarhoven
Neil Mitchell wrote: Hi, de Bruijn indicies look quite nice, and seem to eliminate a lot of complexity when dealing with free variables: http://en.wikipedia.org/wiki/De_Bruijn_index So I was wondering, are they suitable for use in a compiler? If so, what are their disadvantages/advantages? Is

Re: [Haskell-cafe] Higher order types via the Curry-Howard correspondence

2007-05-11 Thread Derek Elkins
Benja Fallenstein wrote: Adding some thoughts to what David said (although I don't understand the issues deeply enough to be sure that these ideas don't lead to ugly things like paradoxes)-- 2007/5/10, Gaal Yahas [EMAIL PROTECTED]: Since the empty list inhabits the type [b], this theorem is

Re: [Haskell-cafe] Recent content is available under a simple permissive license

2007-05-11 Thread Twan van Laarhoven
Robin Green wrote: The Haskell wiki[1] says Recent content is available under a simple permissive license. But this is unilluminating - recent? how recent, exactly? - and will become increasingly understated as time goes by. Wouldn't it be slightly more helpful to say Content added after ...

Re: [Haskell-cafe] Mathematica

2007-05-11 Thread John Meacham
On Fri, May 11, 2007 at 11:26:42AM +0100, Andrew Coppin wrote: Hi folks. How difficult would it be to implement Mathematica in Haskell? I mean, I really like Mathematica, but it costs over £2,000. I can't really afford to pay that much for something that's only really a toy. (It's not