RE: RULES pragmas

2006-07-14 Thread Simon Peyton-Jones
] | On Behalf Of Donald Bruce Stewart | Sent: 12 July 2006 01:41 | To: Malcolm Wallace | Cc: glasgow-haskell-users@haskell.org | Subject: Re: RULES pragmas | | Malcolm.Wallace: | I have a question about {-# RULES #-} pragmas. Here is a very simple | attempt to use them: | | module Simplest

Re: RULES pragmas

2006-07-12 Thread Malcolm Wallace
[EMAIL PROTECTED] (Donald Bruce Stewart) wrote: So what am I doing wrong? And is there any way to ask the compiler to give a warning if the RULES pragma contains errors? In this case, it's because it's missing -fglasgow-exts, I think. Ah, thank you. The missing (and undocumented)

Re: RULES pragmas

2006-07-12 Thread Malcolm Wallace
Malcolm Wallace [EMAIL PROTECTED] wrote: Ah, thank you. The missing (and undocumented) option. Actually, now I came to submit a patch to the manual, I discover that it /is/ documented, but at the beginning of section 7. (But on the index page on the web, the link to section 7 is two whole

Re: RULES pragmas

2006-07-12 Thread Simon Marlow
Malcolm Wallace wrote: Malcolm Wallace [EMAIL PROTECTED] wrote: Ah, thank you. The missing (and undocumented) option. Actually, now I came to submit a patch to the manual, I discover that it /is/ documented, but at the beginning of section 7. (But on the index page on the web, the link

Re: RULES pragmas

2006-07-11 Thread Donald Bruce Stewart
Malcolm.Wallace: I have a question about {-# RULES #-} pragmas. Here is a very simple attempt to use them: module Simplest where {-# RULES simplestRule forall x. id (id x) = x #-} myDefn = id (id 42) I want to verify whether ghc-6.4.1 does actually fire

syntax of RULES pragmas?

2002-05-16 Thread Janis Voigtlaender
Hi, I was trying to play with GHC 5.02's RULES pragmas, but failed due to syntax problems. When trying: {-# RULES map/map forall f g xs. map f (map g xs) = map (f.g) xs #-} main = print (map id (map id Hello)) I get: ghc5 test.hs -O test.hs:1: Variable not in scope: `forall

RE: syntax of RULES pragmas?

2002-05-16 Thread Simon Peyton-Jones
May 2002 14:49 | To: [EMAIL PROTECTED] | Subject: syntax of RULES pragmas? | | | Hi, | | I was trying to play with GHC 5.02's RULES pragmas, but | failed due to syntax problems. | | When trying: | | {-# RULES map/map forall f g xs. map f (map g xs) = map | (f.g) xs #-} | | main = print