Jens Petersen | 4 Feb 2002 08:06
X-Face
Picon
Favicon

Re: compiling hslibs/xlib

Jens Petersen <juhp <at> 01.246.ne.jp> writes:

> "Julian Seward (Intl Vendor)" <v-julsew <at> microsoft.com> writes:
> 
> > Precisely what version of gcc are you using here?
> > (gcc -v)
> > 
> > This has been known to happen if you use the default
> > gcc on RedHat 6.1 and 6.2.
> 
> Good question.  Nothing so old, is the short answer I think.
> 
> The ghc I'm using is from Manuel's ghc-5.02.2-1 rpm (built
> on RH72 I believe) is probably with gcc-2.96.
> 
> I am building green-card and xlib with gcc from cvs!
> 
>         gcc version 3.1 20020131 (Red Hat Linux Rawhide 3.1-0.20)
> 
> Actually I wanted to build with gcc296, but it (rightly?)
> doesn't seem to like "-o" and "-c" in the same command:

Ok, scratch that!  (I was doing "make CC=gcc296".)
Seems it was a gcc-3.1 related problem. :-(

When I make green-card and xlib correctly with gcc-2.96
using "ghc -pgmc/usr/bin/gcc296", everything goes through
fine.

Sorry for the trouble,
(Continue reading)

Simon Peyton-Jones | 4 Feb 2002 12:25
Picon
Favicon
Gravatar

RE: partial evaluation

If you say {-# INLINE f #-} on a fn defn for f, it'll get inlined at
all its call sites, which is sort of what you want.  Just saying 
'evaluate this CAF to WHNF' might only inline the outer combinator.

Generally, some precise way of controlling what gets evaluated
at compile time, a bit less heavyweight than MetaML, would be a fine
thing.    After all that's what C++ templates are. 

But the details of a workable design aren't clear to me.   Ideas?

Simon

| -----Original Message-----
| From: David Feuer [mailto:David_Feuer <at> brown.edu] 
| Sent: 01 February 2002 07:41
| To: glasgow-haskell-users <at> haskell.org
| Subject: partial evaluation
| Sensitivity: Confidential
| 
| 
| It seems to me that it might be useful (and probably 
| fairly easy) to add to GHC a limited sort of partial 
| evaluation: programmer-designated top-level CAFs could be 
| evaluated to WHNF during compilation.  Termination of that 
| compiler phase would obviously not be guaranteed, but if 
| this were possible, I am guessing it would be very useful 
| for some applications, such as combinator-based parsers.  
| The parsers would then be generated at compiler time 
| rather than re-generated every time the parser is 
| executed.  If GHC in fact supports something of this 
(Continue reading)

D. Tweed | 4 Feb 2002 13:03
Picon
Picon

RE: partial evaluation

On Mon, 4 Feb 2002, Simon Peyton-Jones wrote:

> If you say {-# INLINE f #-} on a fn defn for f, it'll get inlined at
> all its call sites, which is sort of what you want.  Just saying 
> 'evaluate this CAF to WHNF' might only inline the outer combinator.
> 
> Generally, some precise way of controlling what gets evaluated
> at compile time, a bit less heavyweight than MetaML, would be a fine
> thing.    After all that's what C++ templates are. 
> 
> But the details of a workable design aren't clear to me.   Ideas?

This is from a rank amateur, so take it with a pinch of salt...

It would be useful to see typical examples of CAFs for which this would be
expected to be useful. In my (limited) programming I haven't come across
that many, with the dominant example being `symbol table' type things, for
which I've generally had a script write out a Haskell module containing
the defs. Other than being slightly more work, the only hassle is that it
forces an otherwise unecessary Show into the type. What other examples
are there where normal evaluation at compile time would be useful?

As far as I know the principal advantage of templates functions in C++
(which I think you're talking about) is that they can be seen as
generating further code (probably in the form of abstract syntax tree
nodes) which is then exposed to the usual _compiler_ optimizations
(abstract evaluation and rewriting is I guess the formal terms) such as
hoisting loop invariants, collapsing addressing arithmetic, etc. It's not
totally clear to me that analogous Haskell stuff can be done using
`standard Haskell evaluation' as opposed to compiler optimizations.
(Continue reading)

Marc van Dongen | 5 Feb 2002 11:53
Picon
Favicon

Linking Problem, ghc 5.02: cannot find -lreadline

Dear all,

After a long time I decided to start using Haskell again:-)
I've downloaded rpm sources (RPMs for SuSE Linux 7.3 (i386,
glibc 2.2) from Ralf Hinze: base and docs RPM, and profiling
libraries RPM.) from the ghc site and installed them. The
only problem I had was that I had to re-install gmp using
rpm. So that was great.

When I tried to compile some large program I was delighted
to see that all object files got created smoothly.

At the linking stage I got an error:
 ''cannot find -lreadline
   collect2: ld returned 1 exit status''

I couldn't find anything about this on the web or in the
mini faq.

Anybody there to give me a quick hint how to get around
this?

Regards,

Marc van Dongen
--

-- 
Marc van Dongen             | dongen <at> cs.ucc.ie |
Computer Science Department |     Western Road | () ASCII ribbon campaign
University College Cork     |    Cork, Ireland | /\ against HTML mail
phone: +353 (0)21 4903578   |     fax: 4903978 |
(Continue reading)

Martin Norbäck | 5 Feb 2002 12:04
Picon
Picon

Re: Linking Problem, ghc 5.02: cannot find -lreadline

tis 2002-02-05 klockan 11.53 skrev Marc van Dongen:
> When I tried to compile some large program I was delighted
> to see that all object files got created smoothly.
> 
> At the linking stage I got an error:
>  ''cannot find -lreadline
>    collect2: ld returned 1 exit status''
> 
> I couldn't find anything about this on the web or in the
> mini faq.
> 
> Anybody there to give me a quick hint how to get around
> this?

Install the readline-devel package.

Regards,

	Martin

--

-- 
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN:
4439498 ]
    Opinions expressed above are mine, and not those of my future
employees.
SIGBORE: Signature boring error, core dumped

Marc van Dongen | 5 Feb 2002 12:28
Picon
Favicon

Re: Linking Problem, ghc 5.02: cannot find -lreadline

Martin Norbäck (d95mback <at> dtek.chalmers.se) wrote:

: >  ''cannot find -lreadline
: >    collect2: ld returned 1 exit status''

 
: Install the readline-devel package.

Thanks. It now works as a charm.

Regards,

Marc

Julian Seward (Intl Vendor | 5 Feb 2002 15:36
Picon
Favicon

ANNOUNCE: GHC 5.03.20020204 snapshot release

There have been a number of significant improvements made to GHC 
since the 5.02 sources were branched off the main GHC development 
tree, but we're not quite ready to make a full 5.04 release yet.  
However, we're keen to get feedback on the new features from people
that don't have easy access to CVS or don't have the time & patience
to build GHC from scratch, so we're making a snapshot release of the
current GHC, in source and binary form.

There are NO GUARANTEES as to the stability of this release, although
we do know it has passed our basic three-stage bootstrap test and run
the regression tests successfully.  In some cases the documentation
hasn't been fully updated to reflect the new features yet.

Briefly, the changes relative to 5.02.2 are:

   - The type system now supports arbitrary rank polymorphism,
     given appropriate type annotations.

   - Heap profiling has had a major overhaul and now supports
     retainer profiling and biographical profiling ala nhc98.

   - Major improvements to the native code generators. You can now 
     compile any and all code through them, including the Prelude. 

   - The FFI syntax has been updated to match the latest version
     of the FFI Haskell 98 Addendum.

   - newtypes support deriving *any* class for which the
     underlying type is also an instance.

(Continue reading)

David Feuer | 6 Feb 2002 00:13
Favicon

the GCC snapshot

What is arbitrarily ranked polymorphism?  I don't 
understand anything past rank 2...  Is this arbitrarily 
ranked polymorphism decidable?

This message has been brought to you by the letter alpha and the number pi.

Ashley Yakeley | 6 Feb 2002 02:14

Binary Compatibility

Apologies if this has been covered before. What compatibility is there 
between code compiled in different versions of GHC?

My JVM-Bridge was compiled under 5.02 and assembled as package 'javavm'. 
Will that package work if added to GHC 5.02.2? What about 5.03?

--

-- 
Ashley Yakeley, Seattle WA

Ashley Yakeley | 6 Feb 2002 02:19

Re: ANNOUNCE: GHC 5.03.20020204 snapshot release

At 2002-02-05 06:36, Julian Seward (Intl Vendor) wrote:

>   - newtypes support deriving *any* class for which the
>     underlying type is also an instance.

How about multi-parameter classes where there are instances for the 
underlying type on more than one parameter: is it possible to specify 
which parameter the newtype is being derived on?

>   - Linear implicit parameters: a highly experimental feature.

What are they?

--

-- 
Ashley Yakeley, Seattle WA


Gmane