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..
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
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
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
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?
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
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 =
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
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
-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
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
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:
>
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
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,
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
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
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
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
18 matches
Mail list logo