Re: How to fix DatatypeContexts?

2013-07-19 Thread Guy
Daniel Wagner wrote: On 2013-07-18 10:46, harry wrote: Why not let all types carry the dictionary automatically, or at least every time that it's used, if that would incur a memory/performance penalty? GHC tells me which context to add when it's missing, so it clearly knows. I'm not sure the

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Guy
Ertugrul Söylemez wrote: Often demanded changes that may or may not happen in the future: * base: Make Functor a superclass of Monad. One of the two most commonly demanded change to the base library. Will break lots and lots of code. Reason: Would greatly simplify a lot of

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Guy
David Thomas wrote: I'd also like to see these two. It occurs to me there may be language tweak that could reduce breakage and add some convenience in both cases. It would not surprise me at all if this has been thought of, examined, and discarded, but I don't have time to dig so I'll just

Re: [Haskell-cafe] Why were datatype contexts removed instead of fixing them?

2013-04-26 Thread Guy
Dan Doel wrote: I don't really think they're worth saving in general, though. I haven't missed them, at least. Maybe you haven't :-) My code is cluttered with redundant type contexts - I can't think of a similar redundancy in any other language.

[Haskell] ~ type operator

2011-06-24 Thread Guy
What does the ~ type operator mean? I've sometimes seen types such as (a ~ b) in error messages, but can't understand what GHC is trying to tell me. Thanks for any enlightenment! ___ Haskell mailing list Haskell@haskell.org

Re: [Haskell-cafe] Type Constraints on Data Constructors

2011-06-09 Thread Guy
...@gmx.de To: haskell-cafe@haskell.org Cc: Guy guytsalmave...@yahoo.com Sent: Thursday, 9 June 2011, 2:06 Subject: Re: [Haskell-cafe] Type Constraints on Data Constructors Hello, you might be thinking of this type? {-# LANGUAGE Rank2Types #-} class Foo f where     foo :: a - f a data Baz

Re: [Haskell-cafe] Type Constraints on Data Constructors

2011-06-09 Thread Guy
Malcolm Wallace malcolm.wallace at me.com writes: The class context on the data constructor buys you nothing extra in terms of expressivity in the language. All it does is force you to repeat the context on every function that uses the datatype. For this reason, the language committee has

[Haskell-cafe] Type Constraints on Data Constructors

2011-06-08 Thread Guy
{- continuing discussion from beginners@ -} I have code such as class Foo f where foo :: a - f a data Bar f a = Foo f = Bar {bar :: f a} instance Foo (Bar f) where foo a = Bar $ foo a GHC insists that I put Foo f = on the instance declaration, even though the constructor for Bar

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 06/06/2011 22:14, Evan Laforge wrote: Back to Haskell: I agree, the choice of the comment delimiter was not the best in light of the possibility to define operators containing it as a substring. But changing it to have --| start a comment too might break too much code (and eliminating -- as a

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:41, Guyguytsalmave...@yahoo.com wrote: On 06/06/2011 22:14, Evan Laforge wrote: Back to Haskell: I agree, the choice of the comment delimiter was not the best in light of the possibility to define operators containing it as

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:50, Guyguytsalmave...@yahoo.com wrote: On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote: On 7 June 2011 17:41, Guyguytsalmave...@yahoo.comwrote: I originally posted because I found that --| stood out much more clearly

Re: [Haskell-cafe] Comment Syntax

2011-06-07 Thread Guy
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote: Another argument against special-casing --|: what happens if you want to use a _different_ documentation generator (I don't know why you would, but someone might) than Haddock, which uses a different markup identifier? We can declare new

[Haskell-cafe] Comment Syntax

2011-06-03 Thread Guy
-- followed by a symbol does not start a comment, thus for example, haddock declarations must begin with -- |, and not --|. What might --| mean, if not a comment? It doesn't seem possible to define it as an operator. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Comment Syntax

2011-06-03 Thread Guy
On 03/06/2011 12:01, Malcolm Wallace wrote: I believe the motivating example that persuaded the Language Committee to allow these symbols was -- which is not of course used anywhere in the standard libraries, but is an extremely nice symbol to have available in user code. Seeing as no

Re: [Haskell-cafe] Comment Syntax

2011-06-03 Thread Guy
On 03/06/2011 12:26, Ivan Lazar Miljenovic wrote: On 3 June 2011 19:19, Guyguytsalmave...@yahoo.com wrote: On 03/06/2011 12:01, Malcolm Wallace wrote: I believe the motivating example that persuaded the Language Committee to allow these symbols was -- which is not of course used

Re: Linking in Dead Code

2011-05-16 Thread Guy
On 15/05/2011 22:28, B. Scott Michel wrote: Cores don't necessarily help linking because it's I/O bound and very concrete sequential algo. It's CPU-bound on my machine. ld uses 100% of one core with occasional disk activity. Pity that the other cores can't help, linking often seems like the

Linking in Dead Code

2011-05-14 Thread Guy
If only 1% of an imported module is used, GHC will link in the entire module. Are there any plans, or at least some ideas, to rectify this? One severe example of this is qtHaskell, where importing the top-level module causes glacial compile (actually link) times and huge executables. Strip can

Re: Linking in Dead Code

2011-05-14 Thread Guy
On 14/05/2011 21:12, Don Stewart wrote: When compiled with split objs GHC makes it possible for the linker to do dead code stripping. Make sure your GHC has split-objs on. Thank you, I hadn't realised that the imported library could be built like this. How is this configured with cabal? (And

Re: Linking in Dead Code

2011-05-14 Thread Guy
On 14/05/2011 21:10, Daniel Fischer wrote: Linking still tends to use a lot of memory with ld, on the appropriate platforms you could try using gold as the linker, that's reported to use less memory (and be faster). No gold for windows :-( Another problem with ld is that it's only single core.

Re: Linking in Dead Code

2011-05-14 Thread Guy
On 14/05/2011 21:12, Don Stewart wrote: When compiled with split objs GHC makes it possible for the linker to do dead code stripping. Make sure your GHC has split-objs on. In the case that split-objs wasn't used, is this a GHC limitation, or an ld limitation? The Delphi linker eliminates

Re: ghc-6.6.1 testsuite on arm eabi: TestStub_stub.h: No such file or directory

2007-11-20 Thread Martin Guy
2007/11/20, Simon Marlow [EMAIL PROTECTED]: Martin Guy wrote: $ .../ghc6-6.6.1/testsuite/tests/ghc-regress$ make stage=2 fast make-fast-stage=2.errs 21 Wrong exit code (expected 0 , actual 2 ) /tmp/ghc27396_0/ghc27396_0.hc:5:27: error: TestStub_stub.h: No such file or directory

ghc-6.6.1 testsuite on arm eabi: TestStub_stub.h: No such file or directory

2007-11-19 Thread Martin Guy
Hi I just ported ghc-6.6.1 to the new Debian port for ARM EABI and all seems to have gone well, but I am mystified by two failing tests when I run the testsuite: $ .../ghc6-6.6.1/testsuite/tests/ghc-regress$ make stage=2 fast make-fast-stage=2.errs 21 I get 7 internal error: adjustor creation

Re: converting capital letters into small letters

2002-07-26 Thread that jefu guy
On Thu, 2002-07-25 at 19:07, Andrew J Bromage wrote: G'day all. On Fri, Jul 26, 2002 at 01:27:48AM +, Karen Y wrote: 1. How would I convert capital letters into small letters? 2. How would I remove vowels from a string? As you've probably found out, these are very hard problems.

Re: The dreaded layout rule

1999-08-03 Thread Guy Lapalme
ndentation that people normally produce are very similar under both rules. Guy Lapalme Université de Montréal PS: as a Quiz, can you guess how in Haskell the following is interpreted? f x = 1 + x g y = 1 + y

new Book on FP with Haskell

1999-06-07 Thread Guy Lapalme
NEW BOOK ANNOUNCEMENT ALGORITHMS : A FUNCTIONAL PROGRAMMING APPROACH by Fethi Rabhi and Guy Lapalme Addison-Wesley Longman, April 1999 (ISBN : 0-201-59604-0) Features: - Primarily an introduction to the design of algorithms

need LML ELF binary for i386 Linux

1998-03-30 Thread Guy Argo
format and modern Linuxes are all ELF. My Linux expertise certainly isn't up to retrofitting it with a.out. So has anybody got an ELF binary version of LML for ix86 Linux? Guy

Re: Stupid Haskell question

1993-02-23 Thread Guy M. Argo
Guy S., Phil W.,... I ran into exactly this problem in two different applications. The first was the same that Guy S. points out, namely adding arbtrirary but well-typed annotations to a parse-tree. The solution I eventually ended up using (after

Stupid Haskell question

1993-02-23 Thread Guy Steele
. Cheers, -- P This looks promising. I'll have to ponder it some. (Don't worry if you don't hear more from me for a while-- I'm out of town for a couple of weeks soon.) --Guy

Stupid Haskell question

1993-02-23 Thread Guy Steele
being single items. Well, I'll manage to hack around it somehow. Thanks for helping! --Guy

Stupid Haskell question

1993-02-22 Thread Guy Steele
Date: Mon, 22 Feb 93 14:28:47 GMT From: wadler [EMAIL PROTECTED] Guy asks the following (non-stupid) Haskell question, which I reply to below. The question points out an area in the Haskell report that seems to be unclear; and a place where it might be worthwhile to change

Stupid Haskell question

1993-02-22 Thread Guy Steele
I blew it! My example had a bad flaw. See below. Date: Mon, 22 Feb 93 19:30:19 GMT From: wadler [EMAIL PROTECTED] Guy, I agree that the report should be updated to express the restriction we really have in mind. Simon: as editor, this is your bailiwick! I also think its