RE: [Haskell-cafe] GHC optimisations

2007-08-20 Thread Simon Peyton-Jones
GHC does some constant folding, but little by way of strength reduction, or using shifts instead of multiplication. It's pretty easy to add more: it's all done in a single module. Look at primOpRules in the module PrelRules. Patches welcome! But please also supply test-suite tests that check

RE: [Haskell-cafe] GHC optimisations

2007-08-21 Thread Simon Peyton-Jones
| GHC does some constant folding, but little by way of strength | reduction, or using shifts instead of multiplication. It's pretty easy | to add more: it's all done in a single module. Look at primOpRules in | the module PrelRules. | | Patches welcome! But please also supply test-suite

RE: [Haskell-cafe] GHC optimisations

2007-08-22 Thread Simon Peyton-Jones
| First of all, optimizing mod and div can not be done with PrelRules, | because they are not primitives, quot and rem are. Yes, you can do them with PrelRules! Check out PrelRules.builtinRules. | Multiplication and division can become shifts: | | {-# RULES | | -- x * 2^n -- x `shiftL`

RE: [Haskell-cafe] GHC optimisations

2007-08-22 Thread Simon Peyton-Jones
| Something I've pondered is adding a more-expressive form of RULES which | works using general pattern matching: Yes, but it would need the rule-matcher in the Simplifier to be more sophisticated. Have a look in specialise/Rules.lhs. No need to be so ambitious; just moving towards what you

RE: [Haskell-cafe] Re: Remember the future

2007-08-24 Thread Simon Peyton-Jones
| From the ghc manual: | | --- | 7.3.3. The recursive do-notation | ... | | It is unfortunate that the manual does not give the translation rules, or at | least the translation for the given example. Hmm. OK. I've improved the manual with a URL to the main paper

RE: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-05 Thread Simon Peyton-Jones
| On that note, I've been finding GHC's type suggestions often worse | than useless, and wish it wouldn't even bother to try -- even more | confusing for new users to have the compiler suggest pointless things | like declaring an instance of Num String or whatever. I'd prefer it | if it could just

RE: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-05 Thread Simon Peyton-Jones
| when you come across a case where GHC produces an | unhelpful message, send it in, along with the program | that produced it, | | Contents of test/error.hs: | f x s = x + show s | | Error message from GHCi: | test/error.hs:2:8: | No instance for (Num

RE: [Haskell-cafe] Typeclasses and implicit parameters

2007-09-06 Thread Simon Peyton-Jones
| -- Hugs allows this. GHC rejects it on the grounds that a is unused | -- on the right-hand side of the (=). I think this is arguably a bug | -- in GHC. | f3 :: (Show a, ?foo :: a) = String | f3 = show ?foo Hugs is right here. GHC 6.8 accepts this too, and has done for some time; there's

RE: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Simon Peyton-Jones
Incidentally, GHC does allow postfix unary operators. http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#postfix-operators Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

RE: Re[2]: [Haskell-cafe] Basic FFI with GHC

2007-09-13 Thread Simon Peyton-Jones
| So, after more searching on the internet and some RTFM, I think I | found my answer, and it seems to work, but I don't know if it's the | right answer to generalize from. | | i have added your recipe to http://www.haskell.org/haskellwiki/FFI_cook_book Thank you Bulat. There's also a GHC

RE: [Haskell-cafe] How can I stop GHCi from calling show for IO actions?

2007-09-18 Thread Simon Peyton-Jones
| -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam | Hughes | Sent: 16 September 2007 04:53 | To: Ryan Ingram | Cc: haskell-cafe | Subject: Re: [Haskell-cafe] How can I stop GHCi from calling show for IO actions? | | Ryan Ingram wrote: | Prelude

RE: [Haskell-cafe] How can I stop GHCi from calling show for IOactions?

2007-09-20 Thread Simon Peyton-Jones
| | It seems that GHCi outputs the contents of the variable you've created | | when there's only one of them. | | Indeed, that is documented behaviour (first bullet here: | http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html#ghci-stmts | ) | Perhaps it's confusing behaviour? If

RE: [Haskell-cafe] How can I stop GHCi from calling show for IOactions?

2007-09-21 Thread Simon Peyton-Jones
| I think a more consistent behavior would be to not print the LHS at | all. If you wanted to print the result of the computation you could | just do: | | Prelude bar 5 | | or, if you also wanted bound variables afterwards: | | Prelude (x, Just y) - bar 5 | Prelude (x, Just y) I've

RE: [Haskell-cafe] Performance problem with random numbers

2007-10-16 Thread Simon Peyton-Jones
We'd be delighted if someone offered a more performant library to put into future GHC releases. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Don | Stewart | Sent: 13 October 2007 22:38 | To: Isaac Dupree | Cc: haskell-cafe@haskell.org |

[Haskell-cafe] RE: [Haskell] [Fwd: undecidable overlapping instances: a bug?]

2007-10-18 Thread Simon Peyton-Jones
| I believe that this weak coverage condition (which is also called | the dependency condition somewhere on the wiki) is exactly what GHC | 6.4 used to implement but than in 6.6 this changed. According to | Simon's comments on the trac ticket, this rule requires FDs to be | full to preserve the

RE: [Haskell-cafe] Class invariants/laws

2007-10-18 Thread Simon Peyton-Jones
| These invariants are basically impossible to enforce by the compiler, | but nonetheless certain classes have laws which are expected to hold, | and I would not be surprised if (for example) GHC optimization RULES | depended on them. | | I, in fact, would be surprised if there were such

RE: [Haskell-cafe] Hiding side effects in a data structure

2007-10-19 Thread Simon Peyton-Jones
[mailto:[EMAIL PROTECTED] | Sent: 19 October 2007 17:41 | To: Simon Peyton-Jones | Cc: C Rodrigues; haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] Hiding side effects in a data structure | | Simon Peyton-Jones wrote: | Good idea. GHC uses it | http://darcs.haskell.org/ghc/compiler

RE: [Haskell-cafe] Hiding side effects in a data structure

2007-10-19 Thread Simon Peyton-Jones
Good idea. GHC uses it http://darcs.haskell.org/ghc/compiler/basicTypes/UniqSupply.lhs Lennart Augustsson and friends invented it @techreport{Augustsson92a, author = {L Augustsson and M Rittri and D Synek}, title = {Splitting infinite sets of unique names by hidden state changes},

RE: [Haskell-cafe] Class invariants/laws

2007-10-19 Thread Simon Peyton-Jones
| Ingram | Sent: 19 October 2007 07:01 | To: Simon Peyton-Jones | Cc: haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] Class invariants/laws | | Just today I was looking at the implementation of Arrows and noticed this: | | {-# RULES | compose/arr forall f g . | arr f arr g

RE: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-11-01 Thread Simon Peyton-Jones
Yes, that's right. We'll be doing a lot more work on the code generator in the rest of this year and 2008. Here we includes Norman Ramsey and John Dias, as well as past interns Michael Adams and Ben Lippmeier, so we have real muscle! Simon | I don't think the register allocater is being

RE: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-11-01 Thread Simon Peyton-Jones
http://hackage.haskell.org/trac/ghc/wiki/Commentary | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paulo J. Matos | Sent: 01 November 2007 13:42 | To: Simon Peyton-Jones | Cc: Neil Mitchell; Stefan O'Rear; [EMAIL PROTECTED]; haskell-cafe@haskell.org

RE: [Haskell-cafe] Building Haskell stuff on Windows

2007-11-08 Thread Simon Peyton-Jones
| Windows and Haskell is not a well travelled route, but if you stray of | the cuddly installer packages, it gets even worse. | | But it shouldn't. Really it shouldn't. Even though Windows is not my | preferred platform, it is by no means different enough to warrant such | additional complexity.

RE: [Haskell-cafe] Somewhat random history question

2007-11-12 Thread Simon Peyton-Jones
| It's interesting that the article completely fails to mention hbc | which I know they used during the GHC bootstrap. Oh well. :) | | On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote: | Andrew Coppin wrote: | ...if GHC is written in Haskell, how the heck did they compile GHC

RE: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-13 Thread Simon Peyton-Jones
| For technical reasons, GHCi can only support the *-form for modules | which are interpreted, so compiled modules and package modules can | only contribute their exports to the current scope. But it does mean | the interpreter isn't referentially transparent, which is weird for a | language that

RE: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-14 Thread Simon Peyton-Jones
| Dan, can you suggest any words we could add to the | documentation that would have prevented you stumbling? | | I guess the thing that would have helped best would have been an error | message like 'x' not in scope, use -fforce-recomp to see all symbols | when running

RE: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-16 Thread Simon Peyton-Jones
Alberto, SevenThunders, Joel, Glark. This is not good. Thank you for being so polite about it. And thanks for working on a reproducible test case -- without that we are 100% stuck. We did fix one just-possibly-related bug in 6.8 recently, which concerned the use of {-# UNPACK #-} on strict

RE: [Haskell-cafe] Stream fusion for Hackage

2007-11-19 Thread Simon Peyton-Jones
| Will it eventually replace Data.List in GHC? | | That is the plan, yep. But first we need to solve the concatMap problem, no? So far as I know, fold/build has the property that if fusion doesn't happen, no harm is done. But streams risk making the program *worse* if Good Things do not

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

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

[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

[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.)

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

[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

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

RE: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Simon Peyton-Jones
| some time ago, it was pointed out that generalized newtype deriving could be | used to circumvent module borders. Now, I found out that generalized newtype | deriving can even be used to define functions that would be impossible to define | otherwise. To me, this is surprising since I thought

[Haskell-cafe] RE: No warning in GHC

2010-03-22 Thread Simon Peyton-Jones
[Redirecting to haskell-cafe] Try http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id2959068 With -Wall I get bash-3.2$ ghc -c -Wall Foo.hs Foo.hs:3:0: Warning: Definition but no type signature for `func' Inferred type: func :: forall t t1. (Num t1)

RE: [Haskell-cafe] GHC, odd concurrency space leak

2010-04-17 Thread Simon Peyton-Jones
I have not been following the details of this, I'm afraid, but I notice this: forever' m = do _ - m forever' m When I define that version of forever, the space leak goes away. What was the old version of forever that led to the leak? If you can boil down the leak to a simple

RE: [Haskell-cafe] Good US Grad schools for functional languages?

2010-05-14 Thread Simon Peyton-Jones
I'd also think of Harvard (Morrisset), Tufts (Ramsey), Portland State (Jones, Sheard), Yale (Hudak), North Eastern (Wand, Felleisen, Shivers), Utah (Flatt), Chicago (Reppy, MacQueen), North Western (Findler). Simon From: haskell-cafe-boun...@haskell.org

[Haskell-cafe] Modular type inference

2010-05-14 Thread Simon Peyton-Jones
Friends Many of you will know that I've been muttering about re-engineering GHC's type inference engine for some time now. Dimitrios, Tom, Martin and I have just completed an epic paper describing the Glorious New Framework that forms the substance of the above mutterings:

RE: [Haskell-cafe] Re: Data instance for a GADT

2010-05-25 Thread Simon Peyton-Jones
There have been a couple of emails about Template Haskell support for · GADTs · View patterns · Reifying instances There’s a ticket for this already http://hackage.haskell.org/trac/ghc/ticket/3497 It’s mainly a library design question, in this case the design of the

RE: [Haskell-cafe] checking types with type families

2010-06-23 Thread Simon Peyton-Jones
| I think your problem here is that there's no mention of `a' on the | left-hand size of from_val's type signature; you either need to use | MPTC+fundep to associate what result is compared to a, or else use a | phantom type parameter of Val to make it data Val result a = ... and | then

[Haskell-cafe] RE: proposal: HaBench, a Haskell Benchmark Suite

2010-06-25 Thread Simon Peyton-Jones
I'm delighted that you are interested in this benchmarking stuff. Much needed. Thank you! | So I still very much like the approach taken by the venerable nofib | suite where it includes not only the real programs, but also the | microbenchmarks and the small programs; you don't have to use

RE: [Haskell-cafe] checking types with type families

2010-07-01 Thread Simon Peyton-Jones
| Here's a concrete case I recently ran into: | | type family SomeOtherTypeFamily a | class SomeClass a where type SomeType a | instance a ~ SomeOtherTypeFamily b = SomeClass a where |type SomeType a = (b,Int) |-- (error) Not in scope: type variable `b' | | The same thing

RE: [Haskell-cafe] checking types with type families

2010-07-01 Thread Simon Peyton-Jones
Claus | I'm interested in situations where you think fundeps work | and type families don't. Reason: no one knows how to make | fundeps work cleanly with local type constraints (such as GADTs). | | If you think you have such as case, do send me a test case. | | Do you have a wiki

RE: [Haskell-cafe] Inferring the most general type

2010-07-01 Thread Simon Peyton-Jones
I don't know an algorithm that can always infer the most general types in situations like this. In your example, if you give a signature for the simple function (f :: Y Maybe - Int), and use RelaxedPolyRec, then GHC will happily infer the type you want for g. For RelaxedPolyRec to work its

RE: [Haskell-cafe] checking types with type families

2010-07-01 Thread Simon Peyton-Jones
| Well, from looking at the documentation, it looks like I could maybe | use a type family if I could write: | | class (DerivedOf a ~ derived) = Typecheck a derived where | ... That's the right idiom yes. But see my message of a few minutes ago... It's neater still to remove the

RE: [Haskell-cafe] Re: checking types with type families

2010-07-07 Thread Simon Peyton-Jones
| -- Does this typecheck? | f :: C a b = T a - Bool | f T1 = True | f T2 = op 3 | | The function f should typecheck because inside the T2 branch we know | that (a~Int), and hence by the fundep (b~Bool). | | Perhaps I'm confused, but there seems to be no link between | the

RE: [Haskell-cafe] checking types with type families

2010-07-07 Thread Simon Peyton-Jones
Martin Sulzmann, Jeremy Waznyhttp://www.informatik.uni-trier.de/%7Eley/db/indices/a-tree/w/Wazny:Jeremy.html, Peter J. Stuckeyhttp://www.informatik.uni-trier.de/%7Eley/db/indices/a-tree/s/Stuckey:Peter_J=.html: A Framework for Extended Algebraic Data Types. FLOPS

[Haskell-cafe] Fundeps and overlapping instances

2010-07-07 Thread Simon Peyton-Jones
Oleg points out, and Martin also mentions, that functional dependencies appear to interact OK with overlapping instances, but type families do not. I this impression is mistaken, and I'll try to explain why in this message, in the hope of exposing any flaws in my reasoning. We can't permit

RE: [Haskell-cafe] Docs on the current and future constraint solver?

2010-07-15 Thread Simon Peyton-Jones
Corey | On 14 July 2010 18:39, Corey O'Connor coreyocon...@gmail.com wrote: | I believe I have run headlong into issue #3064 in ghc | (http://hackage.haskell.org/trac/ghc/ticket/3064). All I think I know | is this: | * this is a performance issue with the system used to solve type |

RE: [Haskell-cafe] Template Haskell sees into abstract data types

2010-07-26 Thread Simon Peyton-Jones
| Data.Map.Map and Data.Set.Set are exported abstractly, without | exposing knowledge about their internal structure. | | I cannot directly create my own class instances for them because of | that. But I found that I can write Template Haskell code that could do | that - those data types

RE: [Haskell-cafe] Template Haskell sees into abstract data types

2010-07-28 Thread Simon Peyton-Jones
I assume you've seen http://hackage.haskell.org/trac/ghc/ticket/4222 There are non-obvious design choices here Simon | -Original Message- | From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On | Behalf Of Serguey Zefirov | Sent: 28 July 2010 11:07 | To:

RE: [Haskell-cafe] Editors for Haskell

2006-06-04 Thread Simon Peyton-Jones
Brian You probably know this, but your kind of application is a big reason that we now make GHC available as a library. (Just say 'import GHC'.) You shouldn't need to parse Haskell yourself: just call GHC's parser. You get back a syntax tree with very precise location information that can

RE: [Haskell-cafe] Re: Editors for Haskell

2006-06-08 Thread Simon Peyton-Jones
| You probably know this, but your kind of application is a big reason | that we now make GHC available as a library. (Just say 'import GHC'.) | | You shouldn't need to parse Haskell yourself: just call GHC's parser. | You get back a syntax tree with very precise location information that |

RE: [Haskell-cafe] Re: Editors for Haskell

2006-06-09 Thread Simon Peyton-Jones
GHC already carefully collects up almost all messages in a data type called Message, so they are easy to re-direct. However at the moment they collected as strings (well as Pretty.Doc values actually) so they have lost their structure. I believe that at one time I had a data type for error

RE: [Haskell-cafe] newbie type signature question

2006-06-12 Thread Simon Peyton-Jones
you need at least one constructor if you say 'where'. S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brock | Peabody | Sent: 09 June 2006 20:34 | To: haskell-cafe@haskell.org | Subject: RE: [Haskell-cafe] newbie type signature question | |

RE: [Haskell-cafe] Re: Functional programming for processing oflargeraster images

2006-06-22 Thread Simon Peyton-Jones
| Everything else about Haskell is so great and well thought out (eg type | classes, no side effects, higher rank polymorphism, existentials) it seems a | pity to throw all this away just because of one unfortunate feature I thought it might be worth mentioning that GHC (well, the HEAD, which

RE: [Haskell-cafe] Template haskell and scoping

2006-06-22 Thread Simon Peyton-Jones
A genuine bug, thank you. I've just fixed it. We'll put the fix in 6.4.3. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of C | Rodrigues | Sent: 21 June 2006 21:55 | To: haskell-cafe@haskell.org | Subject: [Haskell-cafe] Template haskell and

RE: [Haskell-cafe] ghc-pkg on Windows XP

2006-06-22 Thread Simon Peyton-Jones
Has anyone else encountered this? Its ok for us, and for at least some other people. Perhaps uninstall and reinstall? You cant overlook anything when installing, assuming you use the pre-packaged installer. Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff

RE: [Haskell-cafe] Packages and modules

2006-06-26 Thread Simon Peyton-Jones
Simon and I have been thinking about fixing this, and we think we might actually do so for GHC 6.6. Your message provoked us to write up the design. It's here http://hackage.haskell.org/trac/ghc/wiki/GhcPackages Feedback welcome It's worth reading the old threads; for example

RE: [Haskell-cafe] Are FunPtr's stable? (was: how to write an haskellbinding)

2006-06-28 Thread Simon Peyton-Jones
Can I urge any of you who learn stuff that I wish I'd know at the beginning to add that information to GHC's FFI Wiki page? http://haskell.org/haskellwiki/GHC/Using_the_FFI Anyone can add to this material, and it's extremely helpful to jot down what you've learned while it's fresh in your

[Haskell-cafe] RE: Packages and modules

2006-07-03 Thread Simon Peyton-Jones
Concerning packages, Alex asks: | We covered this extensively in the Cabal vs Haskell thread starting | here: http://www.haskell.org//pipermail/libraries/2005-April/003607.html | | You concluded it by saying on April 22: | |And this observation points towards a simpler solution: rather than

[Haskell-cafe] RE: Packages and modules

2006-07-05 Thread Simon Peyton-Jones
In response to Brian and Ian's helpful comments, I've added a bunch more stuff to our proposal about packages. If I have missed anything, let me know. http://hackage.haskell.org/trac/ghc/wiki/GhcPackages If you or anyone else thinks the choices made there are poor ones, continue to say

[Haskell-cafe] RE: Packages and modules

2006-07-05 Thread Simon Peyton-Jones
| So instead of just taking this simple solution, the wiki proposal is instead | destroying the beauty of the per-package namespace idea by incorporating | into it the existing shared namespaces with their attendant problems, | instead of just letting the existing messy system die a natural death

[Haskell-cafe] RE: Packages and modules

2006-07-06 Thread Simon Peyton-Jones
Brian | Actually re-reading my post I realised I may have sounded a bit negative | about the hard work you'd done to collate the various responses to form the | wiki proposal - my apologies Thanks -- email is a fragile medium! | I've followed your suggestion and made a separate page at |

[Haskell-cafe] RE: Packages and modules

2006-07-06 Thread Simon Peyton-Jones
| 1) Qualified names: | | import A.B.C( T1 ) from foo | import A.B.C( T2 ) from bar | type S = A.B.C.T1 - A.B.C.T2 | | I'd suggest that the above should give a compiler error that A.B.C is | ambiguous (as a qualifier), rather than allowing T1 to disambiguate it, | because otherwise it

[Haskell-cafe] The History of Haskell

2006-07-14 Thread Simon Peyton-Jones
Friends, Phil Wadler, John Hughes, Paul Hudak and I have been writing a paper about the The History of Haskell We've submitted an earlier draft to the History Of Programming Languages conference (HOPL'07), and it's been accepted. We have to submit a more-or-less final draft by 1

RE: Re[2]: [Haskell-cafe] REALLY simple STRef examples

2006-07-20 Thread Simon Peyton-Jones
| ps: you successfully going through all the standard Haskell troubles in | this area :) seems that making FAQ about using ST monad will be a | good idea :) Indeed. If someone would like to start one, a good place for it would be GHC's collaborative-documentation Wiki

RE: Re[4]: [Haskell-cafe] REALLY simple STRef examples

2006-07-21 Thread Simon Peyton-Jones
| | ps: you successfully going through all the standard Haskell troubles | in | | this area :) seems that making FAQ about using ST monad will be a | | good idea :) | | Indeed. If someone would like to start one, a good place for it would be | GHC's collaborative-documentation Wiki |

RE: [Haskell-cafe] Why Haskell?

2006-07-24 Thread Simon Peyton-Jones
| I think I understand my issue now with this (other than the anomaly of | the above example). I've been using the make option with ghc to compile | all the dependent sources, creating binaries for all of them. Those | binaries can be loaded into GHCi, but if you do so it will not make the |

[Haskell-cafe] Internships on GHC and Haskell at MSR Cambridge

2006-07-25 Thread Simon Peyton-Jones
Gentle Haskellers Would you be interested in working for three months at Microsoft Research, Cambridge, on a project related to GHC or Haskell? MSR Cambridge now takes interns *year-round*, not just in the summer months. Simon Marlow and I are keen to attract motivated and well-qualified folk

RE: [Haskell-cafe] ghc hackathon start time?

2006-07-26 Thread Simon Peyton-Jones
yes, 9am or 10am. Probably the former. S From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greg Fitzgerald Sent: 25 July 2006 18:31 To: Haskell Cafe Subject: [Haskell-cafe] ghc hackathon start time? What time on September 14th will the GHC Hackathon begin? I

RE: Re[2]: [Haskell-cafe] Why Haskell?

2006-07-26 Thread Simon Peyton-Jones
Looks possible. But it'd depend on using '' not '= \_ - ...', so a bit fragile. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil | Mitchell | Sent: 23 July 2006 13:57 | To: Bulat Ziganshin | Cc: haskell-cafe@haskell.org | Subject: Re:

RE: [Haskell-cafe] Why does Haskell have the if-then-else syntax?

2006-07-27 Thread Simon Peyton-Jones
GHC does indeed include the notion of rebindable syntax. It would be straightforward to extend it to include if-then-else. In effect, that would mean that if e1 then e2 else e3 would behave exactly like cond e1 e2 e3 including from the point of view of typing. (You could choose

RE: [Haskell-cafe] if-then-else as rebindable syntax (was Re: Why does Haskell have the if-then-else syntax?)

2006-07-27 Thread Simon Peyton-Jones
| We alreday are at a stage where first year students trying to master | haskell get error messages like | | Bool is not an instance of the class Num | | if they accidently write 1 + True (or something equivalent, but less | obvious). | | If you want to mess around why not call the function

RE: [Haskell-cafe] REALLY simple STRef examples

2006-08-04 Thread Simon Peyton-Jones
Chad | x = runST $ return (1::Int) This code looks simple, but it isn't. Here are the types: runST :: forall a. (forall s. ST s a) - a ($) :: forall b c. (b-c) - b - c return 1 :: forall s. ST s Int To typecheck, we must instantiate b with (forall s. ST

[Haskell-cafe] RE: [Haskell] thread-local variables

2006-08-08 Thread Simon Peyton-Jones
| I have initialized a wiki page: | | http://haskell.org/haskellwiki/Thread_local_storage Great | I have put a page on the wiki summarizing the thread. However, I want | to say that I think that email is a better medium for most ongoing | discussions. I agree. Discussion by email

RE: [Haskell-cafe] Description of Haskell extensions used by FPTOOLS

2006-08-18 Thread Simon Peyton-Jones
Brian Great! You might like to consider using GHC as a library     http://haskell.org/haskellwiki/GHC/As_a_library The advantage is that you just “import GHC” and then you can parse all of Haskell (including GHC’s extensions).  Then you can

RE: [Haskell-cafe] Derived Read instance for types with infixconstructors (ghc 6.4.1)

2006-09-04 Thread Simon Peyton-Jones
| Another thing: | Would it be a good idea to create derived Read instances that could parse | both, A `And` A and And A A ? | Since 6.4.2 parses the former and 6.2.2 parses the latter that should be | possible, I believe (and both forms are accepted at the ghci prompt). Well, the Haskell 98

RE: [Haskell-cafe] Re: map (-2) [1..5]

2006-09-11 Thread Simon Peyton-Jones
| Well, it seems a shame that we don't have postfix operators already. | I guess that means I am arguing we should introduce a unary postfix | operator, and not even have sugar for factorial, as it conflicts with | array access. | | We *almost* do: | Hugs.Base let (!) 0 = 1; (!) x = x*((!) (x-1))

RE: [Haskell-cafe] System threads?

2006-09-25 Thread Simon Peyton-Jones
| I'm working on a project for which the solution is highly | parallelizable. I've been writing it so far for GHC as a single-threaded | app. I'd like to be able to split the job into multiple pieces, and | spawn different system threads for each piece, so they will run on | separate CPUs. Either

RE: [Haskell-cafe] Haskell DLL crashes Excel

2006-09-25 Thread Simon Peyton-Jones
Andreas, Nikunj, and others I don't have any experience of using GHC to build XLLs, or getting VBA to call Haskell via a DLL. However, this is something we'd like to be easy and reliable using GHC. If any of you are experts on the VBA/DLL side of the question, and can figure out what we should

RE: [Haskell-cafe] Re: Optimization problem

2006-09-28 Thread Simon Peyton-Jones
| Does anything go wrong with irrefutable patterns for existential types? Try giving the translation into System F. Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

RE: [Haskell-cafe] existential types (was Re: Optimization problem)

2006-09-29 Thread Simon Peyton-Jones
] On Behalf Of Ross | Paterson | Sent: 29 September 2006 10:37 | To: haskell-cafe@haskell.org | Subject: [Haskell-cafe] existential types (was Re: Optimization problem) | | On Thu, Sep 28, 2006 at 03:22:25PM +0100, Simon Peyton-Jones wrote: | | Does anything go wrong with irrefutable patterns

RE: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Simon Peyton-Jones
Jim, and others (I'm ccing GHC users) External Core is a feature of GHC that is lonely and unloved. External Core longs to have someone to look after it, tell it that it is a Truly Useful Feature, and keep it working. Seriously, External Core has a strong tendency to bit-rot because (so far as

[Haskell-cafe] RE: [Haskell] Lexically scoped type variables

2006-10-19 Thread Simon Peyton-Jones
| just one more problem is that this issue is too complicated. i'm not | sure that i correctly understands details, but for me the situation | seems like this: in 6.4 it was no distinction between declarations and | usages of type variables - first use declared it, while in 6.6 we have | exactly

RE: [Haskell-cafe] function types as instances of Num

2006-11-01 Thread Simon Peyton-Jones
Try test' = square . (4 :: a - (Integer,a)) Otherwise, how is the compiler to know that you want 4 to be of that type? S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greg | Buchholz | Sent: 26 October 2006 18:46 | To: haskell-cafe@haskell.org |

RE: [Haskell-cafe] Translating Haskell to VHDL. What approach to follow?

2006-11-06 Thread Simon Peyton-Jones
| In order to get part of the work for free I decided to design the | translator as a compiler backend. The best option so far seems to be | Yhc's Core API (http://haskell.org/haskellwiki/Yhc/API/Core ), which | unfortunately lacks type information. | | I discarded GHC due to the current

RE: [Haskell-cafe] Re: Debugging partial functions by the rules

2006-11-15 Thread Simon Peyton-Jones
| The fromJust and `head of empty list' errors are totally equivalent to | the dereferencing of zero pointer in C++ or NullPointerException in | Java. It pains me to see that exactly the same problem arises in | Haskell -- keeping in mind that already in C++ and Java one may | exterminate

RE: [Haskell-cafe] Debugging partial functions by the rules

2006-11-15 Thread Simon Peyton-Jones
| I have always been wondering why error shouldn't always return a call | stack from the occurrance of fromJust up to the function I typed into | ghci (or up to main, for that matter). | | I guess this is because the call tree is rewritten extensively before | being evaluated, and the output

[Haskell-cafe] RE: Debugging partial functions by the rules

2006-11-15 Thread Simon Peyton-Jones
| Looks good! But that is deceiving: the assert was expanded before the rule | fired, and refers to the rewrite rule source line (line 19), not the fromJust | call site (line 12). Now if we could just have the 'assert' token inserted | into the AST before it was expanded, we'd be home and dry.

RE: [Haskell-cafe] the case of the 100-fold program speedup

2006-11-16 Thread Simon Peyton-Jones
Don't knock it! Using a functional language helped you to think about the problem in a new way, and throw together a prototype that worked in a short enough time that you actually did it. A merit of fp is, I think, that you can explore the algorithm design space much more quickly -- and

  1   2   3   4   5   6   >