RE: [Haskell-cafe] wxMac/wxHaskell focus problem, a quick solution

2009-10-29 Thread Simon Peyton-Jones
Would someone like to make a Haskell wiki page explaining all this? Very helpful for people using wx for the first time. Maybe there is one already? Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On | Behalf Of Gregory

[Haskell-cafe] FW: Free Pizza, C++, and Haskell

2009-10-23 Thread Simon Peyton-Jones
You may enjoy this interesting blog post by Bartosz Milewski about understanding C++ template metaprogramming by starting with Haskell. http://bartoszmilewski.wordpress.com/2009/10/21/what-does-haskell-have-to-do-with-c/ Bartosz gave the talk at the Northwest C++ users group; the video for the

RE: [Haskell-cafe] Monotype error

2009-10-15 Thread Simon Peyton-Jones
It's a poor error message, but GHC's entire handling of impredicative polymorphism is poor at the moment. Indeed, I'm seriously considering removing it altogether until we can come up with a more robust story. (So don't rely on it!) The error happens because you are trying to use the type

RE: [Haskell-cafe] Type-level naturals multiplication

2009-10-13 Thread Simon Peyton-Jones
| Is there any way to define type-level multiplication without requiring | undecidable instances? | | No, not at the moment. The reasons are explained in the paper Type | Checking with Open Type Functions (ICFP'08): | |http://www.cse.unsw.edu.au/~chak/papers/tc-tfs.pdf | | We want to

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

2009-10-13 Thread Simon Peyton-Jones
There is no difficulty in principle with Haskell on JVM. There are, however, some obstacles in practice, as this page describes: http://haskell.org/haskellwiki/GHC:FAQ#Why_isn.27t_GHC_available_for_.NET_or_on_the_JVM.3F The way stands open for someone with design taste, knowledge of the JVM,

RE: [Haskell-cafe] Re: A thought about liberating Haskell's syntax

2009-09-29 Thread Simon Peyton-Jones
Type splices are implemented in the upcoming GHC 6.10. Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On | Behalf Of George Pollard | Sent: 16 September 2009 13:45 | To: Haskell Café | Subject: [Haskell-cafe] Re: A thought

RE: [Haskell-cafe] Re: A thought about liberating Haskell's syntax

2009-09-29 Thread Simon Peyton-Jones
sorry – 6.12 From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Rafael Gustavo da Cunha Pereira Pinto Sent: 29 September 2009 13:59 To: Simon Peyton-Jones Cc: Haskell Café Subject: Re: [Haskell-cafe] Re: A thought about liberating Haskell's syntax Hmm

[Haskell-cafe] RE: Resolving overloading loops for circular constraint graph

2009-09-10 Thread Simon Peyton-Jones
://research.microsoft.com/~simonpj/papers/hmap | -Original Message- | From: Stefan Holdermans [mailto:ste...@cs.uu.nl] | Sent: 09 September 2009 14:38 | To: Manuel M T Chakravarty; Simon Peyton-Jones | Cc: glasgow-haskell-users; haskell-cafe; José Pedro Magalhães; Thomas van Noort; | Johan Jeuring

RE: Re[2]: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Simon Peyton-Jones
Actually GHC *does* pass around a RealWorld token right through the optimiser. Just at the moment of code generation we drop it, so that it's not *actually* passed. But for almost all of compilation it's just as if it *was*. Simon | -Original Message- | From:

RE: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

2009-08-20 Thread Simon Peyton-Jones
: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On | Behalf Of Evan Laforge | Sent: 12 August 2009 23:59 | To: Simon Peyton-Jones | Cc: Augustsson, Lennart; haskell; GHC users | Subject: Re: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with | qualified

RE: [Haskell-cafe] Type family signatures

2009-08-19 Thread Simon Peyton-Jones
David is right that the program should be rejected. To be concrete, as he suggests, suppose type instance Fam Int = Bool type instance Fam Char = Bool Now suppose that 'unwrap' did typecheck. Then we could write: x :: Fam Int x = GADT 3 True y :: (Char, Bool) y = unwrap x Voila!

RE: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

2009-08-09 Thread Simon Peyton-Jones
Oh, now I get it, thanks. This message concerns design choices for record-syntax-related GHC extensions. Lennart, pls tune in. You don’t need to have read the thread to understand this message. | I think that Even refers to an example like this: | | module A where | data A = A { a :: Int

[Haskell-cafe] Don't miss CUFP

2009-07-24 Thread Simon Peyton-Jones
Hey, guys, This list has zillions of people who use Haskell for day-to-day work. So you might want to come to the now-annual workshop for Commercial Users of Functional Programming (CUFP) http://cufp.galois.com 4 Sept 2009, Edinburgh Speakers from companies including

RE: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

2009-07-23 Thread Simon Peyton-Jones
Can you give a concrete program to illustrate your point, please? I'm not getting it. Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On | Behalf Of Evan Laforge | Sent: 17 July 2009 23:57 | To: haskell | Subject:

RE: newtype deriving, was Re: [Haskell-cafe] is closing a class this easy?

2009-07-23 Thread Simon Peyton-Jones
| Now, I am scared. This should be regarded as a bug in generalised | newtype deriving, shouldn't it? I would expect newtype deriving to be | unable to come up with instances that cannot be written by hand. | | I would have expected people out on the streets marching to GHC | headquarters

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

2009-07-14 Thread Simon Peyton-Jones
Message- | From: Charles Turner [mailto:charlie.h.tur...@googlemail.com] | Sent: 11 July 2009 22:52 | To: Simon Peyton-Jones | Subject: Haskell as a first language? | | I'll make this short! Do you think Haskell is a good language to start | with? I am brand new to programming and have been

[Haskell-cafe] Fun with type functions

2009-07-02 Thread Simon Peyton-Jones
Friends Ken, Oleg, and I have finished Version 2 of our paper Fun with Type Functions, which gives a programmer's tour of what type functions are and how they are useful. http://haskell.org/haskellwiki/Simonpj/Talk:FunWithTypeFuns If you have a moment to look at, and wanted to help us improve

[Haskell-cafe] RE: 6.12.1 planning

2009-06-30 Thread Simon Peyton-Jones
I've dumped all this on a release plans wiki page: http://hackage.haskell.org/trac/ghc/wiki/Status/Releases Manuel, Duncan: maybe you can modify the wiki directly? Simon | -Original Message- | From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users- |

RE: [Haskell-cafe] Haskell on the iPhone

2009-06-24 Thread Simon Peyton-Jones
Advice, yes; leadership, no. [guidance is ambiguous between those two!] Simon From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of John A. De Goes Sent: 23 June 2009 15:24 To: Simon Peyton-Jones; Haskell Cafe Subject: Re: [Haskell-cafe] Haskell

RE: [Haskell-cafe] Haskell on the iPhone

2009-06-23 Thread Simon Peyton-Jones
Good news about the iPhone port! There seems to be quite a bit more interest now in supporting platforms other than win/*nix on x86 these days*. Maybe now there will be sufficient motivation to make the fundamental changes required. Caveat: I have absolutely no idea of the scope or complexity

RE: [Haskell-cafe] rewrite rules

2009-06-23 Thread Simon Peyton-Jones
| I have a rewrite rule as follows: | | {-# RULES | transform/transform forall (f::forall m. Monoid m = (a - m) - (b - | m)) | (g::forall m. Monoid m = (b - m) - (c | - m)) | (l::FMList c). transform f (transform g | l) = transform

RE: [Haskell-cafe] Template Haskell very wordy w/r/t Decs and Types

2009-05-28 Thread Simon Peyton-Jones
. Simon From: Matt Morrow [mailto:moonpa...@gmail.com] Sent: 28 May 2009 00:08 To: Simon Peyton-Jones Cc: Ross Mellgren; Haskell Cafe; GHC users Subject: Re: [Haskell-cafe] Template Haskell very wordy w/r/t Decs and Types Spectacular! How difficult would it be to implement splicing in decls? I'm

RE: [Haskell-cafe] Bool as type class to serve EDSLs.

2009-05-28 Thread Simon Peyton-Jones
You are absolutely right about the tantalising opportunity. I know that Lennart has thought quite a bit about this very point when designing his Paradise system. Likewise Conal for Pan. One difficulty is, I think, that it's easy to get ambiguity. Eg ifthenelse (a b) e1 e2 The (ab)

RE: [Haskell-cafe] Template Haskell very wordy w/r/t Decs and Types

2009-05-27 Thread Simon Peyton-Jones
Folks Quite a few people have asked for splices in Template Haskell *types*, and I have finally gotten around to implementing them. So now you can write things like instance Binary $(blah blah) where ... or f :: $(wubble bubble) - Int as requested, for example, in the message

RE: [Haskell-cafe] Strange type error with associated type synonyms

2009-05-27 Thread Simon Peyton-Jones
Claus made a suggestion about type error messages: | Apart from bracketing fully applied type synonyms, the error message | could be improved by providing the missing bit of information about | 'Memo': | | D:\home\Haskell\tmp\desktop\types.hs:11:11: | Couldn't match expected type

[Haskell-cafe] Fun with type functions

2009-05-14 Thread Simon Peyton-Jones
Friends Ken, Oleg, and I have been working on a tutorial paper about type families (aka associated data types, or type functions). It's in draft at the moment, and we'd really appreciate feedback that would help us improve it. Here it is:

RE: [Haskell-cafe] Performance Problem with Typeable

2009-05-14 Thread Simon Peyton-Jones
Interesting. Would anyone care to make a Trac ticket for this (with perf bug as the ticket kind), and (if at all possible) do some investigation to see what is going on? Many thanks Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org

RE: [Haskell-cafe] Current status of Annotations

2009-05-06 Thread Simon Peyton-Jones
Annotations are indeed implemented and in the HEAD. Looking at [1], the writeup looks historically skewed, rather than being a crisp writeup of what is actually there. I wonder if Max or Tristan might improve the situation (after the Haskell workshop deadline)? As it happens Tristan's

[Haskell-cafe] RE: [Haskell] ANN control-monad-exception-0.1: Explicitly typed exceptions

2009-04-27 Thread Simon Peyton-Jones
Is there a Haskell Wiki page on extensible exceptions? The paper is a fine reference, it'd be cool to have a wiki page giving programmer-oriented guidance, saying what comes with GHC what other packages are available and some simple examples of how to use them. Simon |

RE: [Haskell-cafe] types and braces

2009-04-17 Thread Simon Peyton-Jones
Conor See this, which I've just written for you: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Parser (Others: please do add to this new Commentary page.) In any case, my guess is that adding atype ::= '{' qcon '}' ought not to introduce ambiguities. You don't want all of

RE: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-15 Thread Simon Peyton-Jones
| But the core part of my suggestion (which this example was meant | to help explain) remains attractive, at least to me: somewhere during | type inference, GHC *does* unify the *apparently free* 'd' with an | internal type variable (lets call it 'd1, as in the type error message) You are

RE: [Haskell-cafe] Strange type error with associated type synonyms

2009-04-07 Thread Simon Peyton-Jones
| Here is a variation to make this point clearer: | | {-# LANGUAGE NoMonomorphismRestriction #-} | {-# LANGUAGE TypeFamilies, ScopedTypeVariables #-} | | class Fun d where | type Memo d :: * - * | abst :: (d - a) - Memo d a | appl :: Memo d a - (d - a) | | f = abst . appl | | -- f' ::

RE: [Haskell] Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Simon Peyton-Jones
Lennart, | Unfortunately, GHC lacks certain optimizations to make efficient code | when using CMonad, | so instead of C speed you get low speed. ... | When I looked at it a year ago or so, it was a return of one | constructor in a sum. | Looking at core, you can see several places where a

RE: [Haskell-cafe] Looping after compiling with cabal

2009-02-24 Thread Simon Peyton-Jones
Try rm-ing *.o, *.hi. Simon | -Original Message- | From: Henk-Jan van Tuyl [mailto:hjgt...@chello.nl] | Sent: 23 February 2009 20:46 | To: Simon Peyton-Jones; Haskell cafe | Subject: Re: [Haskell-cafe] Looping after compiling with cabal | | | I tried to compile with head, but I got

RE: [Haskell-cafe] Looping after compiling with cabal

2009-02-23 Thread Simon Peyton-Jones
I suspect this may be an instance of http://hackage.haskell.org/trac/ghc/ticket/2985 Or (less likely) http://hackage.haskell.org/trac/ghc/ticket/2722 Can you try with the HEAD? Or the 6.10 branch (which includes the fix for #2985)? Simon | -Original Message- | From:

[Haskell-cafe] Take a break: write an essay for Onward! Essays

2009-02-12 Thread Simon Peyton-Jones
Friends Writing papers is fun, we mostly only get to write one *kind* of paper. Here is an opportunity to write something in a totally different style: Submit an essay to Onward! Essays Deadline: 20 April 2009 http://onward-conference.org/calls/foressays An Onward!

RE: [Haskell-cafe] about integer and float operations

2009-02-06 Thread Simon Peyton-Jones
| By the way: it is possible to use a private constructor (via some | special GHC flag?). | I would like to do a quick performance check using the existing | fromRational specialization by constructing a Rational directly. | | I know that Haskell allows declaration hiding for program safety, but

RE: [Haskell-cafe] about integer and float operations

2009-02-05 Thread Simon Peyton-Jones
| Manlio Perillo wrote: | By the way, in GHC.Float there is a (private): | integerLogBase :: Integer - Integer - Int | | Yes, I have needed this function many times. | Too bad it is not exposed. So use the libraries process to propose exposing it! Simon

RE: [Haskell-cafe] Current research on overlapping/closed type families?

2009-01-29 Thread Simon Peyton-Jones
committing to an instance declaration until it's clear that no other instance can match (in which case the above defn would be rejected). Maybe the same thing will work for equalities; I have not thought about it. Simon | | | Simon Peyton-Jones wrote: | Provided all the overlapping instances

RE: [Haskell-cafe] Current research on overlapping/closed type families?

2009-01-23 Thread Simon Peyton-Jones
Provided all the overlapping instances are supplied together, as you suggest, I think what you say makes perfect sense and does not threaten soundness. But we have not yet implemented the idea yet. First priority is to get type families working properly, and in conjunction with type classes.

RE: [Haskell-cafe] Template Haskell question

2009-01-08 Thread Simon Peyton-Jones
Good tricks! Would one of you like to write them up on the Wiki? http://haskell.org/haskellwiki/Template_Haskell Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of | Ryan Ingram | Sent: 08 January 2009 01:55 |

[Haskell-cafe] RE: Haskell Performance

2008-12-29 Thread Simon Peyton-Jones
...@gmail.com] | Sent: 15 December 2008 14:42 | To: Simon Peyton-Jones | Subject: Haskell Performance | | Dear Mr. Peyton Jones, | | I recently watched a video of you giving a talk about type driven | testing in Haskell. | | http://video.google.com/videoplay?docid=- | 4991530385753299192ei

RE: [Haskell-cafe] know a workaround for greedy context reduction?

2008-12-07 Thread Simon Peyton-Jones
This is perfectly reasonable behavior I'm afraid. If you do :info d you'll get d's original type signature. But :type takes an *arbitrary expression* (in this case a single variable 'd', and figures out its most general type. You could have said :t (3*3) for example. In this case, when

RE: [Haskell-cafe] Proposal for associated type synonyms in Template Haskell

2008-11-27 Thread Simon Peyton-Jones
I've been away. I hope others will reply to this thread too; whatever you decide will end up in TH indefinitely. I know that Roman is interested in this. · You focus just on type families in class declarations (which is indeed where associated types started). But I suggest you also

RE: [Haskell-cafe] template haskell overly conservative during splicing?

2008-11-26 Thread Simon Peyton-Jones
Thanks for the bug report. I've fixed the bug: see http://hackage.haskell.org/trac/ghc/ticket/2817 Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Nicolas Frisby | Sent: 04 November 2008 01:03 | To: haskell Cafe | Subject: [Haskell-cafe]

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

2008-11-24 Thread Simon Peyton-Jones
| It's sad to see the OpenGL binding being dropped from GHC binary | installers starting from 6.10. Though this issue has been brought up | and discussed before, I'm sure a lot of people who based their work on | OpenGL would share the same sympathy. The plan (which we have perhaps not

RE: [Haskell-cafe] System Fc in GHC

2008-11-21 Thread Simon Peyton-Jones
Yes, Fc is the intermediate language. The data type is in compiler/coreSyn/CoreSyn.lhs. The Commentary give a lot more context (albeit not Fc-specific). http://hackage.haskell.org/trac/ghc/wiki/Commentary Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hugo Pacheco

RE: [Haskell-cafe] Haskell on the JVM

2008-10-27 Thread Simon Peyton-Jones
Is there an interest in hosting GHC on the JVM (besides my own). There's interest but my understanding is that the GHC backend architecture is not at all friendly to work with. That said, I hear in the next release (I think 6.12, not the 6.10 that's in beta) will have a redesigned backend

RE: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-02 Thread Simon Peyton-Jones
| Unless you use a different compiler. | | Malcolm keeping the dream of multiple implementations alive | | And keep dividing our compiler teams' efforts, while | single-implementation languages conquer :) | | Don thinking that compiler developer fragmentation doesn't help now the

RE: [Haskell-cafe] Injecting Haskell into C

2008-09-25 Thread Simon Peyton-Jones
Anatoly I have not been following the details, but would you consider writing up your example on the GHC user guide Wiki? http://haskell.org/haskellwiki/GHC/Using_the_FFI It's a very good way to share your experience with others. Simon | -Original Message- | From: [EMAIL

RE: [Haskell-cafe] SYB with class: Bug in Derive.hs module

2008-09-16 Thread Simon Peyton-Jones
The message below is a rather old thread but, as Ian says, it's related to http://hackage.haskell.org/trac/ghc/ticket/1470 http://hackage.haskell.org/trac/ghc/ticket/1735 which I have been looking it in preparation for 6.10. The good news is that I think I have fixed #1470. I think #1735 is

RE: [Haskell-cafe] cabal build command and package versions

2008-08-21 Thread Simon Peyton-Jones
| On Wed, 2008-08-20 at 13:53 -0500, Nicolas Frisby wrote: | I have a question about cabal's behavior for the build command. When | using the build command on a cabalized project, any version changes | for installed packages go unnoticed - the necessary modules in the | project are not

RE: [Haskell-cafe] Re: Profiling nested case

2008-07-23 Thread Simon Peyton-Jones
| I had similar experiences as you when attempting to write high | performance Haskell; the language makes you want to use high-level | abstracted functions but the optimizer (while amazing, to be honest) | seems to miss a few cases that it seems like it should hit. Ryan, if you find any of

RE: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-07-23 Thread Simon Peyton-Jones
Andrew writes | I have complete confidence that whoever wrote the GHC manual knew | exactly what they meant. I am also fairly confident that this was the | same person who implemented and even designed this particular feature. | And that they probably have an advanced degree in type system

RE: [Haskell-cafe] A type signature inferred by GHCi that is rejected when written explicitly

2008-07-16 Thread Simon Peyton-Jones
| I myselft don't understand why GHCi doesn't accept the type it | infered as an explicit signature ... I've known about this confusing behavior for some time, and the design goal that the compiler should not infer a type that it can't check seems Clearly Right. Stupidly, though, I had not

RE: [Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

2008-07-16 Thread Simon Peyton-Jones
| Linux Nokia-N810-42-19 2.6.21-omap1 #2 Fri Nov 16 16:24:58 EET 2007 | armv6l unknown | | I would love a working GHC implementation on it, if for nothing else | than how awesome it would be. Whether that means using a C back-end or | native compilation doesn't matter to me so much. | | I might be

RE: [Haskell-cafe] Re: Definition of hidden instance members (bug in GHC or Hugs+Yhc)

2008-07-07 Thread Simon Peyton-Jones
I think GHC is right here. See http://haskell.org/onlinereport/decls.html#instance-decls esp the bit starting It is illegal to give a binding... Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil | Mitchell | Sent: 06 July 2008 00:03 | To:

RE: [Haskell-cafe] what's up with hackage.haskell.org?

2008-06-27 Thread Simon Peyton-Jones
| Subject: [Haskell-cafe] what's up with hackage.haskell.org? | | haven't been able to get to it in a couple of days (at least) It's offline for 24 hrs while Galois move office. Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

RE: [Haskell-cafe] Re: Meaning of ribbonsPerLine at Text.PrettyPrint.HughesPJ ?

2008-06-19 Thread Simon Peyton-Jones
Benedikt Despite the name, neither I nor John Hughes are actively maintaining this library, so if you have got some better implementations of 'cat' and 'sep', do please submit a patch. That's how it'll improve. Do test carefully! Preferably add some Quickcheck tests too. Thanks Simon |

RE: [Haskell-cafe] problems with derive/TH

2008-06-04 Thread Simon Peyton-Jones
| World.hs:42:0: |No instances for (Eq (a (M.Map String Player)), | Eq (a (M.Map ItemId Item)), | Eq (a (M.Map PlayerId Player)), | Eq (a (M.Map RoomId Room)), | Eq (a RoomId)) | arising from the

[Haskell-cafe] A chance to share your experience

2008-05-22 Thread Simon Peyton-Jones
(dot) com * Andy Martin akmartin (at) us (dot) ibm (dot) com * Yaron Minsky yminsky (at) janestcapital (dot) com * Simon Peyton Jones (co-chair) simonpj (at) microsoft (dot) com * Ulf Wiger ulf (dot) wiger (at) ericsson (dot) com This will be the fifth CUFP, for more

RE: [Haskell-cafe] Re: MD5 performance optimizations, and GHC -via-C producing segfaulting binary

2008-05-22 Thread Simon Peyton-Jones
| I'm confused. GHC of course unboxes strict fields of primitive data types. | | {-# OPTIONS -O2 -fvia-C -optc-O2 -funbox-strict-fields #-} | | ... but only when you give -funbox-strict-fields, as there, or UNPACK. | The point is that it never loses sharing to unbox a strict Int field |

RE: [Haskell-cafe] force inlining in GHC

2008-04-29 Thread Simon Peyton-Jones
As luck would have it, I'm working on INLINE pragmas for Roman right at this moment. Could you spare a moment to give me a concrete test case, to make sure I hit your case too? If you can give me a program that doesn't optimise as you expect, I'm much more likely to get it right. Thanks

RE: Re[2]: a faster, accumulating mapM (was Re: [Haskell-cafe] mapM vs mapM_ performance)

2008-04-25 Thread Simon Peyton-Jones
| 1) Why is the Prelude mapM so slow? It seems like running 10x slower | than mapM_ when generating only 50,000 return values is a problem. All this does seem odd. I've submitted a ticket so we don't forget it http://hackage.haskell.org/trac/ghc/ticket/2236 It appears to be some bad (possibly

RE: [Haskell-cafe] retrospective on 'seq' - 'unsafeSeq' ?

2008-04-14 Thread Simon Peyton-Jones
| type constraints accordingly. (Analogously there could be an unsafeShow that | allows showing offending values in an 'error' without adding a Show | constraint to the type signature.) | | Ideally, unsafeShow could also show types as they are underneath, not | as a pretty-printing Show might

RE: [Haskell-cafe] Re: Type Families: infinite compile process?

2008-04-08 Thread Simon Peyton-Jones
You might find it helpful to read our new paper: Type checking with open type functions http://research.microsoft.com/%7Esimonpj/papers/assoc-types/index.htm From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hugo Pacheco Sent: 07 April 2008 22:47 To: Haskell Cafe Subject:

RE: [Haskell-cafe] Template Haskell -- when are things evaluated?

2008-04-02 Thread Simon Peyton-Jones
| I'm reading the following rule from your answer: | | [|exp|] normally returns the unevaluated AST of exp. However, if exp | contains | local variables, these are lifted using Language.Haskell.TH.lift (i.e. | evaluated | before lifting). | | Is that correct? | | | / Emil | | Yes,

[Haskell-cafe] FW: Haskell

2008-04-01 Thread Simon Peyton-Jones
Dear Haskell Cafe members Here's an open-ended question about Haskell vs Scheme. Don't forget to cc Douglas in your replies; he may not be on this list (yet)! Simon -Original Message- From: D. Gregor [mailto:[EMAIL PROTECTED] Sent: 30 March 2008 07:58 To: Simon Peyton-Jones Subject

RE: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Simon Peyton-Jones
| * GHC says that these constraints must be obeyed only | *after* the programmer-written type has been normalised | by expanding saturated type synonyms | ... | I regard this as a kind of pre-pass, before serious type checking | takes place, so I don't think it should interact

RE: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Simon Peyton-Jones
| Why not quite? | | Maybe I was thinking too much in terms of GHC's implementation, but | due to the lazy expansion type synonyms, the expansion is interleaved | with all the rest of type checking. But I think I now know what you | meant: the outcome should be *as if* type synonym expansion

RE: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Simon Peyton-Jones
| | However, I think I now understand what you are worried about. It is the | | interaction of type families and GHC's generalised type synonyms (i.e., | | type synonyms that may be partially applied). I agree that it does lead | | to an odd interaction, because the outcome may depend on the

RE: [Haskell-cafe] ANNOUNCE: wxHaskell 0.10.3 rc1

2008-03-20 Thread Simon Peyton-Jones
Congratulations! wxHaskell is v cool but was suffering from lack of loving care. I'm delighted that it not only has a new team, but that you've pushed through to delivering a release. Brilliant. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:haskell-cafe- | [EMAIL

RE: [Haskell-cafe] Termination of substitution

2008-03-13 Thread Simon Peyton-Jones
As Stefan says, System Fw is strongly normalising. This is a remarkable result because (as you observe) it's very non-obvious how to prove it. However GHC goes beyond Fw by adding data types letrec This blows strong normalisation out of the water. (Assuming you have reasonable

RE: [Haskell-cafe] Where does ~ come from?

2008-03-11 Thread Simon Peyton-Jones
| I think, it won’t find it. As Cale said, it’s a type variable. It’s like | the “a” in the following definition: | | data T a = T a a | | I think, Conal Elliott used an operator type variable in order to make his | code more readable. The (~) is a type parameter which stands for an arrow |

RE: [Haskell-cafe] Orphan instances

2008-03-05 Thread Simon Peyton-Jones
| GHC emits warning about orphan instance A (T t), since neither A nor T are | defined in B. However I can't move the instance to A or T since it depends | on B. Would it be fine to lift the restriction, such that it is accepted | to declare the instance in a module where the type or the class or

RE: [Haskell-cafe] Re: problem with collection (container) class

2008-02-18 Thread Simon Peyton-Jones
Good point. Happily I improved the error message a couple of weeks ago, so it'll be better in the next release Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Fischer | Sent: 08 February 2008 22:24 | To: Ben Franksen;

RE: [Haskell-cafe] Haskell maximum stack depth

2008-02-05 Thread Simon Peyton-Jones
| First bad thing: | Stack size (memory consumed) doubles each time it overflows. | | Second bad thing: | Arbitrary limit on stack size unrelated to overall (heap) memory | available. | | Third bad thing (the really bad thing): | If a stack has temporarily grown (to 64M say), it will never shrink

RE: [Haskell-cafe] Haskell maximum stack depth

2008-02-05 Thread Simon Peyton-Jones
| Yes, this is the standard solution, and it's a good one because it has a robust cost model (no quadratic | costs). However, it's tricky to get right; copying is simpler. If a significant fraction of runtime (for some | interesting program(s)) turned out to be consumed by copying stacks

RE: [Haskell-cafe] Haskell maximum stack depth

2008-02-04 Thread Simon Peyton-Jones
| Sorry, but if what you say is true then things are even worse than I | thought :-( This behaviour seems really bad to me, especially for | concurrent programs. Which behaviour precisely? Can you say what is wrong and what behaviour you expect? S

RE: [Haskell-cafe] Haskell maximum stack depth

2008-02-01 Thread Simon Peyton-Jones
| Yes, using lots of stack is clearly bad with ghc, but this is a ghc | bug. In fact the only reason these programs do use lots of stack | (vs. heap) is just a peculiarity of ghc rts implementation, so it | really should be ghc that fixes the problem, or at least admits | responsibility :-) I

[Haskell-cafe] Internships at GHC HQ

2008-01-25 Thread Simon Peyton-Jones
Would you be interested in working at Microsoft Research for three months? If so, you might want to think about applying for an internship. Simon and I are looking for interns, starting in summer 2008. Lots of background info here: http://hackage.haskell.org/trac/ghc/wiki/Internships

[Haskell-cafe] Why functional programming matters

2008-01-23 Thread Simon Peyton-Jones
Friends Over the next few months I'm giving two or three talks to groups of *non* functional programmers about why functional programming is interesting and important. If you like, it's the same general goal as John Hughes's famous paper Why functional programming matters. Audience: some are

RE: [Haskell-cafe] Re: Properties of optimizer rule application?

2008-01-21 Thread Simon Peyton-Jones
| I think I also found a typo: Quite right, thanks -- now fixed. | Recently I found that specialisation interacts in an unexpected way with | explicit RULES (and with inlining). I used a function multiple times and | this seemed to make GHC specialising this function (although I did not | used a

RE: [Haskell-cafe] Re: Properties of optimizer rule application?

2008-01-17 Thread Simon Peyton-Jones
| Ok, this was a bad example. Try this one: |project . project . foo | with the rules |project (project x) = project x |project (foo x) = projectFoo x | | Both rules can be applied to the expression, but you get one fusion more, | if you use the first one first. Let me guess, in

RE: [Haskell-cafe] Properties of optimizer rule application?

2008-01-16 Thread Simon Peyton-Jones
GHC has one main mechanism for controlling the application of rules, namely simplifier phases. You can say apply this rule only after phase N or apply this rule only before phase N. Similarly for INLINE pragmas. The manual describes this in detail. I urge against relying on top-down or

RE: [Haskell-cafe] Possibility to port vshaskell to VS2008?

2008-01-14 Thread Simon Peyton-Jones
Yes, the VS Shell indeed looks an attractive platform, because it's free. It'd be great if someone wanted to port Visual Haskell to the VS Shell. Simon | -Original Message- | From: Peter Verswyvelen | Sent: 13 January 2008 21:15 | Subject: Re: [Haskell-cafe] Possibility to port

[Haskell-cafe] FW: Treating command-line arguments as a Haskell expression

2007-12-24 Thread Simon Peyton-Jones
Would someone familiar with the command-line-parsing libraries care to help Krassimir? Thanks Simon -Original Message- From: Krassimir Krustev [mailto:[EMAIL PROTECTED] Sent: 23 December 2007 11:38 To: Simon Peyton-Jones Subject: Treating command-line arguments as a Haskell expression

RE: [Haskell-cafe] A Foldable binary search tree

2007-12-24 Thread Simon Peyton-Jones
| data (Ord a) = BST a = Empty | BST (BST a) a (BST a) | | Experience has taught me to _never_ put class contexts on data | definitions. Correct. Haskell-98 contexts on data-type declarations are a mis-feature of Haskell, which I resisted at the time but failed to eliminate. As others have

[Haskell-cafe] Haskell performance

2007-12-20 Thread Simon Peyton-Jones
Don, and others, This thread triggered something I've had at the back of my mind for some time. The traffic on Haskell Cafe suggests that there is a lot of interest in the performance of Haskell programs. However, at the moment we don't have any good *performance* regression tests for GHC. We

RE: [Haskell-cafe] class default method proposal

2007-12-11 Thread Simon Peyton-Jones
| If it really would work ok we should get it fully specified and | implemented so we can fix the most obvious class hierarchy problems in a | nice backwards compatible way. Things are only supposed to be candidates | for Haskell' if they're already implemented. Getting it fully specified is the

[Haskell-cafe] RE: [Haskell] Nested guards?

2007-12-07 Thread Simon Peyton-Jones
| And I think that the solution is not to make the language larger and larger | everytime someone wants a feature but to give people the tools to provide | features without language changes. Of course that would be even better! (Provided of course the resulting programs were comprehensible.)

[Haskell-cafe] RE: [Haskell] Nested guards?

2007-12-06 Thread Simon Peyton-Jones
[redirecting to Haskell Cafe] | It is clear that this situation must not stay this way. Bit by bit, | disciples of Perl and Python discover Haskell and demand that Haskell will | be plastered with syntactic sugar until the simplicity of the functional | approach isn’t visible anymore.

RE: [Haskell-cafe] Looking for largest power of 2 = Integer

2007-12-06 Thread Simon Peyton-Jones
| (2) Is it safe to assume an underlying implementation based on GMP? | (In Num.lhs there is an alternative definition for .NET. Is that ever | used?) Is it safe to assume the size of a GMP limb is the same as | the word size? (I'm assuming it is for now.) I think it's safe for now. In principle

RE: [Haskell-cafe] Nofib modifications

2007-12-03 Thread Simon Peyton-Jones
By all means apply a patch, I think. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Mitchell | Sent: 03 December 2007 17:34 | To: Haskell Cafe | Cc: Simon Marlow; Malcolm Wallace; Duncan Coutts | Subject: [Haskell-cafe] Nofib

RE: [Haskell-cafe] A tale of three shootout entries

2007-11-28 Thread Simon Peyton-Jones
| If, after investigation (and perhaps checking with Don) you find that adding bangs makes your program go | slower, even though the function is in fact strict (otherwise it might go slower because it's just doing more | work!) then I'd love to see a test case. | | I wonder if this could be

RE: [Haskell-cafe] A tale of three shootout entries

2007-11-28 Thread Simon Peyton-Jones
| There may well have been changes to the strictness analyser that make | some of the bangs (or most) unnecessary now. Also, its very likely | I didn't check all combinations of strict and lazy arguments for the | optimal evaluation strategy :) | | If it seems to be running consitently faster (and

RE: [Haskell-cafe] A tale of three shootout entries

2007-11-27 Thread Simon Peyton-Jones
| Something I found with Dons version on my machine was that if I removed | all the exclamation marks and the -fbang-patterns bit at the top it went | about 20% faster as well as being much cleaner code, but with my very | rudimentary understanding of Haskell I wasn't entirely sure it would |

RE: [Haskell-cafe] expanded standard lib

2007-11-21 Thread Simon Peyton-Jones
| Well, I've already filed 4 bugs against GHC. One was already fixed by | GHC 6.8.1 (yays!), one is trivial and will be fixed in 6.8.2, and the | other two it seems nobody is keen to work on. (In fairness, one of them | is fairly nontrivial.) I get the impression that I'd probably be | regarded as

RE: [Haskell-cafe] expanded standard lib

2007-11-21 Thread Simon Peyton-Jones
Some random thoughts triggered by this thread 1. I've been bowled over by the creativity unleashed by having a central site (Hackage), with a consistent installation story (Cabal), where you can upload packages with no central intervention. A single issue of the Haskell Weekly (sic) News

RE: [Haskell-cafe] expanded standard lib

2007-11-20 Thread Simon Peyton-Jones
| the php documentation has user contributed notes where people can leave | sniplets of useful code as comments, eg | | http://www.php.net/manual/en/introduction.php | | I think this is a very nice feature. | | I would love to have this on haskell, especially because the | documentation often

<    1   2   3   4   5   6   >