RE: desperately seeking RULES help

2008-06-09 Thread Simon Peyton-Jones
The -fno-method-sharing flag was supposed to be a bit experimental, which is why it takes the cheap-and-cheerful route of being a static flag. (Only dynamic flags can go in OPTIONS_GHC.) What it does is this. When you call an overloaded function f :: C a => a -> a, in a function g = ...f...f..

Re: desperately seeking RULES help

2008-06-09 Thread Roman Leshchinskiy
Simon Peyton-Jones wrote: The -fno-method-sharing flag was supposed to be a bit experimental, which is why it takes the cheap-and-cheerful route of being a static flag. (Only dynamic flags can go in OPTIONS_GHC.) It's dynamic in the HEAD, see Mon May 19 19:59:56 PDT 2008 Roman Leshchinskiy

Re: Building ndp Problem

2008-06-09 Thread Roman Leshchinskiy
Dominic Steinitz wrote: I think I have things working now but the "make" system seems to have problems. I followed the instructions here: http://www.haskell.org/haskellwiki/Data_Parallel_Haskell/PackageNDP but got the messages below. Sorry, I haven't checked whether doing "make" works in the

Re: desperately seeking RULES help

2008-06-09 Thread Claus Reinke
could you please send the complete options/commandline and the expect final form of 'test'? i did play with Conal's example as well, but couldn't find a combination to make it work. perhaps i'm looking at the wrong output, but it seems i either get non-inlined 'onInt's in various forms or multip

Re: desperately seeking RULES help

2008-06-09 Thread Conal Elliott
How does method sharing interact with the ability of the rules engine to "look through" lets? Wouldn't an f rule kick in when fint is seen, by looking through the fint binding? I've been wondering: will pattern matching look through a let even when the let-bound variable is used more than once?

RE: desperately seeking RULES help

2008-06-09 Thread Simon Peyton-Jones
GHC only "looks through" *value* bindings, because (as you note) you can get arbitrary loss of sharing otherwise. And fint isn't a value binding, since it has work to do. (Not much, I grant you -- maybe we could take account of that.) Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Re: desperately seeking RULES help

2008-06-09 Thread Lennart Augustsson
Here it is: {-# OPTIONS_GHC -O2 -Wall -fglasgow-exts -ddump-simpl #-} -- compile with: ghc -fno-method-sharing -c F.hs module F(test) where -- | Domain of a linear map. class AsInt a where toInt' :: a -> Int fromInt' :: Int -> a {-# INLINE[1] toInt #-} toInt :: (AsInt a) => a -> Int toInt =

Problems interrupting IO with -threaded

2008-06-09 Thread Judah Jacobson
Hi all, I'm writing a program that reads input from the user but should also handle a ctrl-c. My attempt is below; the program forks a thread to read one character of input, and kills that thread upon receiving a sigINT. It works fine compiled without -threaded, but with -threaded it blocks fore

Missing Data.Map library? GHC 6.8.2 under OS X

2008-06-09 Thread Thomas Krauss
I seem to be having trouble using GHC 6.8.2 and OS X (10.5). It seems that any use of anything from Data.Map results in a link error like Undefined symbols: "___stginit_containerszm0zi1zi0zi1_DataziMap_", referenced from: ___stginit_Main_ in tst_parse.o ld: symbol(s) not found Has anyone

Re: Missing Data.Map library? GHC 6.8.2 under OS X

2008-06-09 Thread Johannes Waldmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 what is the exact source file, what is the compile/link command that causes the error? if you use "ghc --make Foo" then all dependencies should be handled correctly. what is the output of "ghc-pkg list containers"? -BEGIN PGP SIGNATURE- Ver

Re: Missing Data.Map library? GHC 6.8.2 under OS X

2008-06-09 Thread Bulat Ziganshin
Hello Thomas, Monday, June 9, 2008, 11:42:40 PM, you wrote: > Undefined symbols: > "___stginit_containerszm0zi1zi0zi1_DataziMap_", referenced from: > ___stginit_Main_ in tst_parse.o > ld: symbol(s) not found add --make to cmdline -- Best regards, Bulatmail

Re: Missing Data.Map library? GHC 6.8.2 under OS X

2008-06-09 Thread Jeremy Shaw
At Mon, 9 Jun 2008 15:42:40 -0400, Thomas Krauss wrote: > > I seem to be having trouble using GHC 6.8.2 and OS X (10.5). It seems > that any use of anything from Data.Map results in a link error like > > Undefined symbols: > "___stginit_containerszm0zi1zi0zi1_DataziMap_", referenced from: >

Re: desperately seeking RULES help

2008-06-09 Thread Claus Reinke
Here it is: {-# OPTIONS_GHC -O2 -Wall -fglasgow-exts -ddump-simpl #-} -- compile with: ghc -fno-method-sharing -c F.hs thanks! it seems i misread the users guide (or is this a bug?). i used -frewrite-rules ("Switch on all rewrite rules"), which does not(!) work, instead of -fglasgow-exts, whic

Re: desperately seeking RULES help

2008-06-09 Thread Don Stewart
claus.reinke: > >Here it is: > > > >{-# OPTIONS_GHC -O2 -Wall -fglasgow-exts -ddump-simpl #-} > >-- compile with: ghc -fno-method-sharing -c F.hs > > thanks! it seems i misread the users guide (or is this a bug?). > i used -frewrite-rules ("Switch on all rewrite rules"), which > does not(!) work,

Re: desperately seeking RULES help

2008-06-09 Thread Claus Reinke
Right. There are two things here: 1) -frewrite-rules enables rules to fire. 2) -fglasgow-exts enables parsing of RULES pragmas, and their interpretation. You need both if you wish to both write your own rules, and have them fire. nope!-) -fglasgow-exts is sufficient for the RULE to be

Re: desperately seeking RULES help

2008-06-09 Thread Don Stewart
claus.reinke: > >Right. There are two things here: > > > > 1) -frewrite-rules > > > >enables rules to fire. > > > > 2) -fglasgow-exts > > > >enables parsing of RULES pragmas, and their interpretation. > > > >You need both if you wish to both write your own rules, and have them > >fire. > > nop

Re: desperately seeking RULES help

2008-06-09 Thread Claus Reinke
nope!-) -fglasgow-exts is sufficient for the RULE to be parsed and applied in Lennart's code, -frewrite-rules doesn't seem to serve any noticable purpose. Well, if -O is on, -frewrite-rules is already on by default. Try -fno-rewrite-rules with -O to turn them off specifically, yep, see my note

Re: desperately seeking RULES help

2008-06-09 Thread Don Stewart
claus.reinke: > >>nope!-) -fglasgow-exts is sufficient for the RULE to be parsed > >>and applied in Lennart's code, -frewrite-rules doesn't seem to > >>serve any noticable purpose. > > > >Well, if -O is on, -frewrite-rules is already on by default. > >Try -fno-rewrite-rules with -O to turn them off