RE: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Simon Peyton-Jones
Jim, and others (I'm ccing GHC users) External Core is a feature of GHC that is lonely and unloved. External Core longs to have someone to look after it, tell it that it is a Truly Useful Feature, and keep it working. Seriously, External Core has a strong tendency to bit-rot because (so far as

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Simon Peyton-Jones
| So, my hypothesis is that the inliner doesn't recognise that | ``if (x = 0) then ...'' is effectively a case analysis on x, and thus the | argument discount is not fired. So we need to figure out how to extend | this criterion for when to apply the argument discount. Correct. GHC generates

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Simon Peyton-Jones wrote: Correct. GHC generates case (x# =# 0#) of { True - ...; False - ... } But the argument discount only applies when we have case y of { ... } So you really want a discount for the args of a primop. Do you think it should be that

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Simon Peyton-Jones
| Do you think it should be that general? I was thinking the discount | should only apply in the situtation where a case expression contains an | expression with one free varaible that is a function argument, and all | operations are primitive. Well, if you see x =# 0 then it'd be good

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Simon Peyton-Jones wrote: The constant-folding rules for the primops are all in prelude/PrelRules.lhs in function primOpRules. Please add more rules. For example, I see that x +# 0 = x is not in there! It is in libraries/base/GHC/Base.lhs x# +# 0#

Re[2]: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Bulat Ziganshin
Hello Simon, Wednesday, October 11, 2006, 2:23:59 PM, you wrote: The constant-folding rules for the primops are all in prelude/PrelRules.lhs in function primOpRules. Please add more rules. For example, I see that x +# 0 = x is not in there! but GHC.Base contains {-#

ANNOUNCE: GHC version 6.6

2006-10-11 Thread Ian Lynagh
=== The (Interactive) Glasgow Haskell Compiler -- version 6.6 === The GHC Team is pleased to announce a new release of GHC. There have been many changes since the 6.4.2

Re: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Samuel Bronson
Simon Peyton-Jones simonpj at microsoft.com writes: | So, my hypothesis is that the inliner doesn't recognise that | ``if (x = 0) then ...'' is effectively a case analysis on x, and thus the | argument discount is not fired. So we need to figure out how to extend | this criterion for

Re: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Aaron Tomb
Hi, I was just talking yesterday with a group of other students about using the ExternalCore data type as the starting point for a project we're starting to work on with the goal of having more practice implementing various compiler components. We were also talking about the possibility

Re: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Samuel Bronson wrote: branch. I've got a patch that seems like it ought to do a bettter job, but it doesn't seem to give the $wrotate functions any discount (the $wshift functions having been tagged by the {-# INLINE shift #-} pragmas I added all over). Unfortunately I

Link errors when using the GHC API

2006-10-11 Thread Bas van Dijk
Dear GHC hackers, I would like to experiment with the GHC API. However I get link errors when using it. For example: - $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive,

Re: Link errors when using the GHC API

2006-10-11 Thread Mathew Mills
Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source? Seems like something didn't build right... You might use 'nm' to examine your libHSCabal.a to see if a similarly named symbol is

ghc-6.6 candidate Win32 installer

2006-10-11 Thread Sigbjorn Finne
Hi, for Win32 users wanting the latest GHC goodness, a candidate 6.6 installer is now available, http://haskell.org/ghc/dist/6.6/ghc-6-6.msi If anyone's willing to download it and kick the tires a bit, that'd be great. If nothing too egregious shows up, I'm planning to publish sometime