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

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 mess

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 tha

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 guid

RE: [Haskell-cafe] shared local definitions

2006-05-18 Thread Simon Peyton-Jones
Consider f x y = let r = expensive x in r+y g vs = map (f 2) vs You are expecting (expensive 2) to be computed just once. That is indeed what will happen if you write f_opt x = let r = expensive x in \y -> r+y g_opt vs = map (f_opt 2) vs It's easy enough to trans

RE: [Haskell-cafe] RE: Troubles with FFI

2006-05-16 Thread Simon Peyton-Jones
A confusing thing is that the Haskell web site is primarily now using MedaWiki http://haskell.org/haskellwiki/Haskell It used to use MoinMoin (pages starting http://www.haskell.org/hawiki), and that's what you used. I think your new input will be more long-lasting if you use the former. W

RE: [Haskell-cafe] Troubles with FFI

2006-05-15 Thread Simon Peyton-Jones
| > the automated ones, seemed to handle the case of passing numerical | > arrays to C, and having them get updated and passed back. That is my | > primary interest in the FFI and yet no obvious solution or example | > could be found after days of internet searching and pouring over | > tutorials

[Haskell-cafe] RE: Template Haskell Person/Paper entry

2006-05-11 Thread Simon Peyton-Jones
Can anyone help Christoph with uploading a Postscript file to a haskellwiki page? Thanks | -Original Message- | From: Ch. A. Herrmann [mailto:[EMAIL PROTECTED] | Sent: 11 May 2006 14:29 | To: Ian Lynagh | Cc: Simon Peyton-Jones | Subject: Re: Template Haskell Person/Paper entry | | Hi

RE: [Haskell-cafe] Is it possible to export module aliases?

2006-05-03 Thread Simon Peyton-Jones
Are you asking for the same thing as described under "Permit qualified exports" on this Haskell Prime page? http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/ModuleSyst em Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | B

RE: [Haskell-cafe] RuntimeLoader

2006-04-14 Thread Simon Peyton-Jones
Triggered by your msg, I've added a link to hs-plugins from GHC's user-documentation page http://haskell.org/haskellwiki/GHC/Documentation It's a Wiki page with a specific section for collaborative documentation; please add more material. Simon | -Original Message- | From: [EMAIL

RE: [Haskell-cafe] Re: coherence when overlapping?

2006-04-13 Thread Simon Peyton-Jones
| I believe that GHC's overlapping instance extensions | effectively uses inequalities. I tried to write down GHC's rules in the manual: http://haskell.org/ghc/dist/current/docs/users_guide/type-extensions.htm l#instance-decls The short summary is: - find candidate instances that match - if there

RE: [Haskell-cafe] coherence when overlapping?

2006-04-12 Thread Simon Peyton-Jones
| In the GHC documentation which describes the extension of overlapping | instances, an example similar to the following is given. | | >class C a where | > f:a -> a | >instance C Int where | > f=e1 | >instance C a where | > f=e2 | > | >let g x = f x | >in g 1 | | In this case GHC takes an ¡

RE: [Haskell-cafe] Template haskell instance checking

2006-03-02 Thread Simon Peyton-Jones
Not at the moment, I'm afraid, but it's the kind of question that TH ought to be able to answer. I could offer guidance if someone wanted to implement it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | heatsink | Sent: 02 March 2006 00:55 |

RE: [Haskell-cafe] typesafe non-local returns in the IO monad

2006-02-21 Thread Simon Peyton-Jones
I'm not sure this works. Consider this newContinuation (\k -> return (callContinuation k)) ... The partial application (callContinuation k) has no 's' in its type, and so can go anywhere. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf O

RE: [Haskell-cafe] building ghc on win with gcc of cygwin, without cygwin1.dll (-mno-cygwin flag) ?

2006-02-20 Thread Simon Peyton-Jones
| Googling around I've found that there exists the -mno-cygwin flag which | you can use to not include this lib.. So would it might be possible to | get a ghc build not using cygwin.dll with just cygwin ? I don't know. It sounds plausible. But we only have enough resource to maintain one route f

RE: [Haskell-cafe] library sort

2006-02-20 Thread Simon Peyton-Jones
Strangely, Hoogle isn't easy to find at haskell.org. I'm not sure where the best place to add a link would be: perhaps near the top of the libraries-and-tools page? It's all wikified now, so would someone like to add it somewhere appropriate? Simon | -Original Message- | From: [EMAIL PR

RE: [Haskell-cafe] Numerical methods in Haskell

2006-02-10 Thread Simon Peyton-Jones
| Between google searching and looking through the activity | report, I take it that no one has really developed serious | libraries for matrix manipulations, diff eqs, etc. | | Are there any practical reasons for this or is it just a | matter of the haskell community being small and there not | b

RE: [Haskell-cafe] Language shootout (reloaded)

2006-02-10 Thread Simon Peyton-Jones
Congratulations, guys! An amazing, and (maybe it should have been!) to me surprising, achievement. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Donald Bruce Stewart | Sent: 10 February 2006 01:35 | To: haskell-cafe@haskell.org | Subject: [

RE: [Haskell-cafe] Number 1, at least for now

2006-02-02 Thread Simon Peyton-Jones
| > though, I think this is a great oprotunity to improve ghc's optimizer. | | Huh, that would be the best thing with the whole shootout endeavour.. Yes indeed. One thing that would be really helpful, as a first step, would be to identify a bunch of concrete examples that GHC "should" have opt

RE: [Haskell-cafe] Known Unknowns

2006-02-01 Thread Simon Peyton-Jones
| Here's a brief introduction. I intend to write up (on the performance page on | the wiki) a list of things we've done to improve the shootout entries. Yes, do put what you wrote before on the Wiki. (The performance-advice page seems to have vanished but it should be on the user-documentation wi

RE: [Haskell-cafe] GHC integers pre-allocation

2006-01-23 Thread Simon Peyton-Jones
I believe that we statically allocate all ASCII chars, and Ints between -16 and +16.  Have a look in ghc/rts/StgMiscClosures.cmm   Simon   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Monique Monteiro Sent: 22 January 2006 23:26 To: haskell-cafe@haskell.org S

[Haskell-cafe] Controlling scheduling in Concurrent Haskell

2006-01-04 Thread Simon Peyton-Jones
| Given that actually controlling priorities is not an option, adding | blocking like that makes sense. One can make a ring buffer instead of a Concerning priorities and scheduling (which affect both this shootout thread, and perhaps Joel's timeleak program), one can take two approaches 1. Ask

RE: [Haskell-cafe] Re: [Haskell] Re: Boxing (Day) Question

2006-01-04 Thread Simon Peyton-Jones
| > You'd still need several versions of the code for a polymorphic function, one | > for pointer values, one for 4-byte non-pointers, one for 8-byte non-pointers | > etc. | | Yes, but that's up to the user. A type variable always has a particular | kind, so for instance one might want an array ov

[Haskell-cafe] RE: [Haskell] Re: Boxing (Day) Question

2006-01-04 Thread Simon Peyton-Jones
al Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ashley Yakeley | Sent: 29 December 2005 17:56 | To: haskell@haskell.org | Subject: [Haskell] Re: Boxing (Day) Question | | In article | <[EMAIL PROTECTED] | ft.com>, | "Simon Peyton-Jones" <[EMAIL PROTECTED

RE: [Haskell-cafe] Joels Time Leak

2005-12-29 Thread Simon Peyton-Jones
Thanks for looking, Adrian, It'd be great if someone was able to find out more about what's going on here. Bandwidth at GHC HQ is always tight, so the more precisely someone can pinpoint what's happening, the faster we can fix it. Joel has done a lot by making a repro case. Maybe others can he

[Haskell-cafe] RE: GHC optimization issue

2005-12-29 Thread Simon Peyton-Jones
m: Joel Reymont [mailto:[EMAIL PROTECTED] | Sent: 22 December 2005 14:09 | To: Haskell-Cafe Cafe | Cc: Simon Peyton-Jones; Simon Marlow | Subject: GHC optimization issue | | Folks, | | I have been trying to improve my byte swapping routines as part of my | effort to speed up serialization. I then

RE: Erlang vs. Haskell (was Re: [Haskell-cafe] binary IO)

2005-12-29 Thread Simon Peyton-Jones
| Using Haskell for this networking app forced me to focus on all the | issues _but_ the business logic. Type constraints, binary IO and | serialization, minimizing memory use and fighting laziness, timers, | tweaking concurrency and setting up message channels, you name it. That's a disappointing

RE: [Haskell-cafe] Haskell vs. Erlang for heavy-duty network apps

2005-12-28 Thread Simon Peyton-Jones
I've already said to Joel (off-list) how valuable I think his experience of using Haskell for a new kind of real application is. I see no reason in principle why Haskell shouldn't work just fine for his kind of application. But he's pushing hard on parts of the system (both run-time-system and li

[Haskell-cafe] RE: GHC optimization issue

2005-12-22 Thread Simon Peyton-Jones
The fact that GHC inlines the (big) unspecialised version and not the (apparently smaller) specialised version, is something we should look into. Simon | -Original Message- | From: Joel Reymont [mailto:[EMAIL PROTECTED] | Sent: 22 December 2005 14:09 | To: Haskell-Cafe Cafe | Cc: Simon P

RE: [Haskell-cafe] First steps in Haskell

2005-12-20 Thread Simon Peyton-Jones
| (mild) culture shock here. It is typical for people in the Haskell | community to view things in a rather principled way. A language | tutorial is supposed to introduce /the language/. If you want to know | how to compile or execute a Haskell program, well then, look at the | appropriate tutorial

RE: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Simon Peyton-Jones
| -Original Message- | From: Bjorn Lisper [mailto:[EMAIL PROTECTED] | Sent: 19 December 2005 13:06 | To: Simon Peyton-Jones | Cc: [EMAIL PROTECTED]; haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] First steps in Haskell | | Simon P-J: | >Daniel is right, by definition. He is a

RE: [Haskell-cafe] First steps in Haskell

2005-12-19 Thread Simon Peyton-Jones
Daniel is right, by definition. He is a new user. He had difficulty. That much is incontrovertible. While he may seem unusual, perhaps he is only unusual in that he's told us about his experience rather than trying Perl instead. For which, much thanks, Daniel! In any case, I think it'd be grea

RE: [Haskell-cafe] +RTS -M800M

2005-12-19 Thread Simon Peyton-Jones
| Is there any chance there is a bug in recent GHCs (or perhaps Linux?) | affecting this? I'm fairly sure I've lately seen Haskell programs | consuming significantly larger amounts of memory than they should be | allowed to, and I can try to isolate a test case if it is of | interest. New bugs a

RE: Re[2]: [Haskell-cafe] Unbound threads and FFI

2005-12-16 Thread Simon Peyton-Jones
I've added a FAQ. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Simon Marlow | Sent: 15 December 2005 09:26 | To: Bulat Ziganshin | Cc: Haskell-Cafe Cafe | Subject: RE: Re[2]: [Haskell-cafe] Unbound threads and FFI | | On 14 December 2005 1

RE: [Haskell-cafe] Unbound threads and FFI

2005-12-15 Thread Simon Peyton-Jones
Did you read the paper Extending the Haskell Foreign Function Interface with Concurrency, described in the GHC Wiki page about concurrency? It'd be a good start http://hackage.haskell.org/trac/ghc/wiki/GhcConcurrency Please do improve it. Simon | -Original Message- | From: [EMAIL PROTECT

RE: [Haskell-cafe] Top-level TVars

2005-12-15 Thread Simon Peyton-Jones
Yes, they do | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 14 December 2005 20:39 | To: Tomasz Zielonka | Cc: Simon Marlow; Haskell-Cafe Cafe | Subject: Re: [Haskell-cafe] Top-level TVars | | | > On Wed, Dec 14, 2005 at 02:17

RE: [Haskell-cafe] Re: Bringing Erlang to Haskell

2005-12-14 Thread Simon Peyton-Jones
There's a (GHC-specific) Wiki page on concurrent programming in GHC, in the new GHC Wiki. http://hackage.haskell.org/trac/ghc/wiki/GhcConcurrency Feel free to add more info to it. I've dropped in the links below. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EM

RE: [Haskell-cafe] Top-level TVars

2005-12-14 Thread Simon Peyton-Jones
be working. | | Thanks, Joel | | P.S. What is the ETA for 6.5? | | On Mon, Dec 05, 2005 at 10:50:13AM -0000, Simon Peyton-Jones wrote: | > | > It turns out to be easy to provide | > | > newTVarIO :: a -> IO (TVar a) | > | > which you can call from inside 'u

RE: [Haskell-cafe] STM reference?

2005-12-09 Thread Simon Peyton-Jones
GHC now has a Wiki http://cvs.haskell.org/trac/ghc/wiki, so I've started a new page to give pointers to material on concurrent programming using GHC. (The link is near the bottom.) Please add to it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behal

RE: [Haskell-cafe] Re: TChan implementation: Why TVarList

2005-12-06 Thread Simon Peyton-Jones
sounds as if you need a priority queue, so you can say "give me the message with the earliest time" but otherwise yes. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 06 December 2005 11:46 | To: Simon Peyton-

[Haskell-cafe] RE: TChan implementation: Why TVarList

2005-12-06 Thread Simon Peyton-Jones
er 2005 11:28 | To: Simon Peyton-Jones | Cc: Haskell Cafe | Subject: TChan implementation: Why TVarList | | Simon, | | Why did you guys implement TChan on top of your own TVarList instead | of a regular list? | | -- | 'TChan' is an abstract type representing an unbounded FIFO channel. |

RE: [Haskell-cafe] GADT question

2005-12-06 Thread Simon Peyton-Jones
| I would like the type system to distinguish the three types and enforce | their properties. so far, I have come up with the following: | | | data Sigma | data Tau | data Rho | | data Type a where | ForAll :: [Id] -> Type Rho -> Type Sigma | Fun :: Type a -> Type a -> Type a | TyC

RE: [Haskell-cafe] Re: :t main

2005-12-06 Thread Simon Peyton-Jones
I've not been following this thread, but I wanted to check: you do know about Tarmo Uustalu's stuff about comonads, don't you? http://www.cs.helsinki.fi/u/ekarttun/comonad/ summarises (link to "The essence of dataflow programming" at the bottom) Simon | -Original Message- | From: [EMAIL

RE: [Haskell-cafe] STM, orElse and timed read from a channel

2005-12-05 Thread Simon Peyton-Jones
| > I think you are really asking for some way to create top-level | > transactional variables? | | Yes. Perhaps it would be easier to do it cleanly than arbitrary | top-level IO bindings? It turns out to be easy to provide newTVarIO :: a -> IO (TVar a) which you can call from inside '

RE: [Haskell-cafe] STM, orElse and timed read from a channel

2005-12-05 Thread Simon Peyton-Jones
Can you provide a small test case that demonstrates the crash? I think it's pretty unlikely that we'll support nested atomically (via unsafePerformIO) anytime soon. UnsafePerformIO is, well, unsafe. I think you are really asking for some way to create top-level transactional variables? Simon |

RE: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-28 Thread Simon Peyton-Jones
| Andrew Pimlott: | //about my highly spiritual essay on lazy computing of PI//: | | > In addition to being clever and terribly funny, the conclusion | > foreshadows (inspired?) later work on Enron [1]. | | Come on, it is improbable that Master Simon ever read my essay... I hadn't before, but I

RE: [Haskell-cafe] STM, IO and event loops

2005-11-28 Thread Simon Peyton-Jones
A good design pattern, I think, is to have a Haskell thread dedicated to each socket. It can suck on the socket and dump what it finds into an STM channel or buffer. Then other threads (the ones doing the work) can read it transactionally. It should be find to have lots of threads, esp if most

RE: Re[2]: [Haskell-cafe] using of data types as kinds

2005-11-23 Thread Simon Peyton-Jones
Sorry should be fixed now (or shortly when the mirror does its stuff) Simon | -Original Message- | From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] | Sent: 22 November 2005 19:28 | To: Simon Peyton-Jones | Cc: haskell-cafe@haskell.org | Subject: Re[2]: [Haskell-cafe] using of data types

RE: [Haskell-cafe] GHCi always optimizes?

2005-11-23 Thread Simon Peyton-Jones
| Anyway, it's strange that you are experiencing crashes. IIRC, there | were problems if you mixed modules compiled with different levels of | optimisation in the same program, but I am not sure it still happens. If you can make a reproducible crash, please tar it up and send it to us. It shoul

RE: [Haskell-cafe] using of data types as kinds

2005-11-22 Thread Simon Peyton-Jones
Read about Omega! I have not written anything about what I plan to do in GHC, but basically it amounts to allowing you to use a data type as a kind. Busy doing GADTs and impredicativity at the moment though Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTE

RE: [Haskell-cafe] Project postmortem

2005-11-21 Thread Simon Peyton-Jones
mber 2005 00:57 | To: Simon Marlow | Cc: Simon Peyton-Jones; Haskell Cafe | Subject: Re: [Haskell-cafe] Project postmortem | | I'm happy to report that the problem can be reproduced by running the | code from my darcs repo at http://test.wagerlabs.com/postmortem. See | the README file. I'm on

RE: [Haskell-cafe] Project postmortem

2005-11-18 Thread Simon Peyton-Jones
| Unless lightning strikes and tomorrow morning I figure out what's the | deal with the spurious Mac OSX crashes, I think this might be my last | network app in Haskell. I should really be spending time on the | business end of the app intead of figuring out platform differences | and the like. J

RE: [Haskell-cafe] Re: IO exception not being caught

2005-11-16 Thread Simon Peyton-Jones
Indeed! I always use braces and semicolons with do-notation. You are free to do so too! Nothing requires you to use layout. Indeed, you can freely mix the two. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 16 November

RE: [Haskell-cafe] Re: Bring down the house (was Re: GHC cannot compilemy code)

2005-11-16 Thread Simon Peyton-Jones
I've fixed the HEAD so that it behaves decently on this now. Thanks for reporting it. It's in the test suite! S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 09 November 2005 19:27 | To: Haskell Cafe | Subject: [Haskell-cafe]

RE: [Haskell-cafe] Re: Bring down the house (was Re: GHC cannot compilemy code)

2005-11-15 Thread Simon Peyton-Jones
Turns out this is to do with the way that type synonyms are represented. Somewhere there is type a :*: b = HCons a b If you simply use HCons instead of :*: the problem goes away. (Use `HCons` if you want it infix.) This is a bug; using HCons instead is a workaround, but it might reduce

RE: [Haskell-cafe] handling rank 2 types

2005-11-04 Thread Simon Peyton-Jones
| But this gives a "less polymorphic" error. I think the problem is that | ghc will not instantiate the "a'" in "IO a'" as a higher-rank type | because it occurs within a type contructor. I believe this is the | restriction referred to at the end of 7.4.9[1]. If I instead write I think that is

RE: [Haskell-cafe] Help using QuickCheck

2005-10-26 Thread Simon Peyton-Jones
I'm afraid this fix didn't make it into the 6.4 branch, but the double error (which is bad) is certainly fixed in the HEAD Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Andrew Pimlott | Sent: 21 October 2005 20:45 | To: haskell-cafe@haskell.

RE: [Haskell-cafe] Template Haskell -- Bug?

2005-10-26 Thread Simon Peyton-Jones
| $ ghc --make THTest1.hs | Chasing modules from: THTest1.hs | Compiling THTest1TH( ./THTest1TH.hs, ./THTest1TH.o ) | Compiling THTest1 ( THTest1.hs, THTest1.o ) | | THTest1.hs:10:4: `incrSelf' is not a (visible) method of class `IncrSelf' I've now fixed this bug, in the HEAD.

RE: [Haskell-cafe] Nice way to calculate character frequency inastring

2005-10-25 Thread Simon Peyton-Jones
| > Better still, help us make it faster! | > | > Simon | | What can your average Haskell user do to help other than | point out things they don't like? Well-characterised test cases are always motivating: small programs that should go fast, and don't. Why does the brain-twisting version work fas

RE: [Haskell-cafe] Nice way to calculate character frequency in astring

2005-10-25 Thread Simon Peyton-Jones
| Ugh! These are all horrid. If something on the lines of | | > calc = accumArray (+) 0 (minBound, maxBound) . (map (\x->(x,1))) | | isn't fast enough, complain to the implementors! What's the | point of functional programming if one has to twist into a | shape that allows inspection of one's own

RE: [Haskell-cafe] Template Haskell -- Bug?

2005-10-21 Thread Simon Peyton-Jones
| $ ghc --make THTest1.hs | Chasing modules from: THTest1.hs | Compiling THTest1TH( ./THTest1TH.hs, ./THTest1TH.o ) | Compiling THTest1 ( THTest1.hs, THTest1.o ) | | THTest1.hs:10:4: `incrSelf' is not a (visible) method of class `IncrSelf' This is definitely a bug. I'll look int

RE: [Haskell-cafe] pre-built ghc 6.4.1 crashes building FPS

2005-10-18 Thread Simon Peyton-Jones
OK we can reproduce it now. It's a bad bug.. we're investigating. S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 18 October 2005 14:01 | To: Donald Bruce Stewart | Cc: Haskell Cafe | Subject: Re: [Haskell-cafe] pre-built ghc

RE: [Haskell-cafe] pre-built ghc 6.4.1 crashes building FPS

2005-10-17 Thread Simon Peyton-Jones
Joel A released GHC should never crash. Can you submit a bug report please (see "Report a bug" on GHC's home page)? In doing so, please attach the source code that provokes the crash. Thanks Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J

RE: [Haskell-cafe] Template Haskell and Types

2005-09-23 Thread Simon Peyton-Jones
To: Simon Peyton-Jones | Cc: haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] Template Haskell and Types | | Simon Peyton-Jones wrote: | > design note http://research.microsoft.com/~simonpj/tmp/notes2.ps | | | In the above paper there is something about 'giveUp'. Seems to quite |

RE: [Haskell-cafe] Nofib documentation

2005-09-19 Thread Simon Peyton-Jones
I don’t think there’s a nofib reference document.  (Would someone like to write one?)   The standard/slow/fast inputs are meant to vary the input data to the benchmarks so they take more or less time.  Not all programs are set up that way because we didn’t write all of them, and don’t nec

RE: [Haskell-cafe] generics question, logical variables

2005-09-19 Thread Simon Peyton-Jones
f whether we should make any changes in GHC's libraries to take SYB3 (using classes) into account... Simon | -Original Message- | From: Ralf Lammel | Sent: 19 September 2005 04:34 | To: [EMAIL PROTECTED] | Cc: haskell-cafe@haskell.org; Simon Peyton-Jones | Subject: RE: [Haskell-cafe] gen

RE: [Haskell-cafe] Template Haskell and Types

2005-09-13 Thread Simon Peyton-Jones
| > putStrLn $(mysplice ''MyData) | > | | Thanks for responses. Is there any up-to-date documentation avaliable? Template Haskell is, alas, poorly documented. I would really welcome someone to volunteer to help write better documentation. Meanwhile, as the user manual says, the stuff about

RE: [Haskell-cafe] Functional dependencies and type inference

2005-08-23 Thread Simon Peyton-Jones
but that's as far as I can take it today. Question: what restrictions on the newtype-deriving mechanism would make it sound? Simon | -Original Message- | From: Thomas Jäger [mailto:[EMAIL PROTECTED] | Sent: 23 August 2005 02:02 | To: Simon Peyton-Jones | Cc: Einar Karttunen; h

RE: [Haskell-cafe] Functional dependencies and type inference

2005-08-11 Thread Simon Peyton-Jones
Einar Good question. This is a more subtle form of the same problem as I described in my last message. In fact, it's what Martin Sulzmann calls "the critical example". Here is a boiled down version, much simpler to understand. module Proxy where class Dep a b | a -> b

RE: [Haskell-cafe] Functional dependenices in class declarations

2005-08-11 Thread Simon Peyton-Jones
It's intentional. Consider this data type declaration data B b = MkT (A a b) Should that be accepted? The only thing it could possibly mean would be data B b = MkT (forall a. A a b) and I suppose that might possibly be useful. But in this case you're also saying that "a" dete

RE: [Haskell-cafe] Updating the Haskell Standard

2005-07-21 Thread Simon Peyton-Jones
| I think an updated standard is overdue. I find it difficult anymore to | write any but the most trivial of programs using pure Haskell 98. Some | notable, and widely-used, features developed since then include: | | * Overlapping instances | * FFI | * Hierarchical namespace | * Undecidable i

RE: [Haskell-cafe] Overlapping Instances with Functional Dependencies

2005-07-08 Thread Simon Peyton-Jones
Martin's dead right. GHC uses a less sophisticated mechanism to do matching when it's thinking about functional dependencies than when it's doing straight instance matching. Maybe something cleverer for fundeps would make sense, as you point out. I hadn't thought of that before; it's a good poin

RE: [Haskell-cafe] Re: [Haskell] ANNOUNCE: GHC survey results

2005-06-30 Thread Simon Peyton-Jones
| If anything I would like to see the Haskell community produce a Haskell | front end which was compiler neutral. That would facilitate many | interesting projects, and that might even help with the need to support | new extensions as they come along. There are already some candidates | floating

RE: [Haskell-cafe] Question about classes from a Haskell newbie.

2005-05-25 Thread Simon Peyton-Jones
http://research.microsoft.com/%7Esimonpj/Papers/type-class-design-space will fix manual Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Scott J. | Sent: 25 May 2005 13:29 | To: haskell-cafe | Subject: Re: [Haskell-cafe] Question about classes

[Haskell-cafe] FW: GHC.Prim.realWorld

2005-05-09 Thread Simon Peyton-Jones
| I'd like to know what the function GHC.Prim.realWorld does exactlly | in the STG code below: Think of it as a fixed value. We want the join point $w$j to be a function, with at least one argument, otherwise it'll be evaluated eagerly (since it has a primitive type), which is semantically wro

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Simon Peyton-Jones
May 2005 10:31 | To: Simon Peyton-Jones | Cc: Haskell Cafe | Subject: RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes,instances | | | On Wed, 4 May 2005, Simon Peyton-Jones wrote: | | > hi-boot files can't contain class declarations. This should be checked, | > but isn

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Simon Peyton-Jones
hi-boot files can't contain class declarations. This should be checked, but isn't, hence puzzling message. GHC 6.4 has a better setup. Actually, it still doesn't check for absence of class decls, but it will shortly. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [Haskell-cafe] Typeclasses and instances

2005-05-02 Thread Simon Peyton-Jones
I've finally gotten around to fixing this. The fix won't be in 6.4 (ever) as mentioned below, but it's done in the HEAD. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Simon Peyton-Jones | Sent: 18 March 2005 13:01 | T

RE: [Haskell-cafe] RFE: Extensible algebraic user-defined data types?

2005-04-29 Thread Simon Peyton-Jones
| Suppose I want to extend this datatype to the one including | possibility of neither Left or Right (i. e. None). Currently I have to | use Maybe Either, so my options are: | | Just (Left a) | Just (Right b) | Nothing | | If I could extend the Either datatype I might have (syntax may be | diffe

RE: [Haskell-cafe] RFE: Extensible algebraic user-defined data types?

2005-04-29 Thread Simon Peyton-Jones
| Regarding reusing constructor names across several datatypes: is it | possible to qualify them with their enclosing datatype name, like | Maybe.Nothing where there is a name conflict? Then I might reuse | Nothing in my hypothetical data type, and it would be NEither.Nothing | if conflicting with

[Haskell-cafe] Do you use GHC?

2005-04-15 Thread Simon Peyton-Jones
Dear Haskell folk, PLEASE READ THIS IF YOU USE THE Glasgow Haskell Compiler (GHC). I virtually never send messages to overlapping sets of lists, but I'm doing so this time, because I'd really like to get to everyone who uses GHC. Here at GHC HQ, we are often asked how many people use GHC, and w

RE: [Haskell-cafe] Instances of constrained datatypes

2005-04-07 Thread Simon Peyton-Jones
I believe that you may find these papers relevant: "Bulk types with class" http://research.microsoft.com/%7Esimonpj/Papers/collections.ps.gz "Restricted data types" http://www.cs.chalmers.se/~rjmh/Papers/restricted-datatypes.ps John's paper mentions that it would be great if the constraint simpli

RE: [Haskell-cafe] Typeclasses and instances

2005-03-18 Thread Simon Peyton-Jones
Strange. This is a bug in GHC that crept in when I implemented GADTs. It turns out to be slightly structural; fixing it will change the interface-file format. So it won't get fixed in 6.4; but will in the HEAD.That doesn't bother me; the context on a data/newtype decl is a strange thing anywa

RE: [Haskell-cafe] tuples and Show in GHC

2005-03-07 Thread Simon Peyton-Jones
No principled reason. I wish there was no limit, which would involve generating code on the fly for instances that weren't pre-generated, but I never got around to implementing that. So you have to stop somewhere. Actually the Report says it should have Show instances up to 15 at least, but GHC d

RE: [Haskell-cafe] how to avoid overlapping instance error?

2005-02-28 Thread Simon Peyton-Jones
| Or I suppose, one could rephrase this question as why not | simplify instance declarations to be: | |instance ToSet where | toSet = Set.fromList | | And let the typechecker take care of figuring out what instance is | being specified here? That might be possible, but Haskell forces y

RE: [Haskell-cafe] how to avoid overlapping instance error?

2005-02-27 Thread Simon Peyton-Jones
Unfortunately, the context of an instance decl is not taken into account when matching instance decls. Yes, it would make sense to do so, but it'd make the system yet more complicated. So Show (table item) overlaps with Show ([] item) Overlap is checked lazily, so if you look for Show (MyTable t

RE: [Haskell-cafe] Problems building GreenCard

2005-02-22 Thread Simon Peyton-Jones
-fno-prune-tydecls is a dead flag. Just remove it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Dmitri Pissarenko | Sent: 15 February 2005 21:04 | To: haskell-cafe@haskell.org | Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] | Subject: Re: [Hask

RE: [Haskell-cafe] how to name third party libraries?

2005-02-08 Thread Simon Peyton-Jones
Send mail to [EMAIL PROTECTED], saying what's in your libraries, and suggesting names. The process usually converges pretty rapidly. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of S. | Alexander Jacobson | Sent: 07 February 2005 22:55 | To: ha

RE: [Haskell-cafe] MonadPlus instance for IO

2005-02-02 Thread Simon Peyton-Jones
that instance seems to be only in Control.Monad.Error in the 'mtl' package. It's not in the standard base package. You may need to import an mtl module to tell GHC to look there. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | David Roundy |

RE: [Haskell-cafe] Re: ocr'ed version of "The implementation offunctional languages"

2005-01-31 Thread Simon Peyton-Jones
Matthew Yes, I'm happy for you to OCR the book, but can I ask that whatever you get be made accessible from my web site, so there's one place people can go to find everything that's available? What would OCR buy us? Searching, I guess, which is a fantastic plus. Anything else? Thanks very m

RE: [Haskell-cafe] wierd type errros with MPTCs

2005-01-28 Thread Simon Peyton-Jones
The kind error seems fair enough. GHC looks at the class decl, and decides that indexVal is of kind *. Then the instance declaration uses it with kind (*->*). You may say that it should look at the instance decl too, before deciding kinds, but the instance decl might be in another file. Uncomm

RE: [Haskell-cafe] Re: Some random newbie questions

2005-01-10 Thread Simon Peyton-Jones
| -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John | Hughes | Sent: 10 January 2005 09:16 | To: haskell-cafe@haskell.org | Subject: [Haskell-cafe] Re: Some random newbie questions | | I seriously considered switching frlom Hugs to GHC for my introd

[Haskell-cafe] The Implementation of Functional Programming Languages

2005-01-07 Thread Simon Peyton-Jones
I'm happy to announce that my out-of-print 1987 book, The Implementation of Functional Programming Languages is now available online at http://research.microsoft.com/%7Esimonpj/papers/slpj-book-1987/index.htm Very many thanks to Marnie Montgomery, who did all the work.

RE: [Haskell-cafe] Some random newbie questions

2005-01-07 Thread Simon Peyton-Jones
| * As far as I can determine, there is no way to check pattern matches for | exhaustiveness. Coming from OCaml, this feels like losing a significant | safety net! How do people program so as not to be getting dynamic match | failures all the time? GHC has -fwarn-incomplete-patterns and -f

RE: [Haskell-cafe] The implementation of Functional

2005-01-07 Thread Simon Peyton-Jones
The online-readable copy is all ready to go. I'm just awaiting a final "ok" from Marnie and I'll announce it. For a paper copy we'll await John's Cafepress efforts. Much thanks to both Marnie and John. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Be

RE: [Haskell-cafe] GHC for .NET?

2005-01-05 Thread Simon Peyton-Jones
| Understandably, however, there is real resistance in language communities like Haskell's to changing | or even extending a language for the sake of interoperability and API access: instead people work | incredibly hard to encode interoperability via existing mechanisms. In the end, whoever picks

RE: [Haskell-cafe] Problem with fundeps.

2005-01-04 Thread Simon Peyton-Jones
I can see why you think it "ought" to work. The instance decls instance (Vspace a v) => Vspace a (c->v) instance Num a => Vspace a a certainly overlap, but GHC does something sensible with the overlap, and that's presumably what you want. BUT the functional-dependency mechanism do

RE: [Haskell-cafe] GHC for .NET?

2005-01-04 Thread Simon Peyton-Jones
| "The GHC compiler for .NET is currently under development at | Microsoft Research, Cambridge". | | Hmm. That location sounds familiar :-) Does anyone know if this is | actually going to happen? Or if there's any code anywhere, however | experimental, to try? It'd make a lot of sense to g

RE: [Haskell-cafe] Flattening tail recursion?

2004-12-13 Thread Simon Peyton-Jones
I have not been following the details, but yes, the strictness analyser only runs when you say -O, and without strictness analysis you can get different space behaviour. Sometimes more, sometimes less. In this case, strictness analysis helps. Simon | -Original Message- | From: [EMAIL PR

RE: [Haskell-cafe] Classes in type declarations in Hugs

2004-12-07 Thread Simon Peyton-Jones
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions. html#NEWTYPE-DERIVING | -Original Message- | From: Graham Klyne [mailto:[EMAIL PROTECTED] | Sent: 07 December 2004 10:46 | To: Simon Peyton-Jones; [EMAIL PROTECTED] | Subject: RE: [Haskell-cafe] Classes in type

<    1   2   3   4   5   6   7   >