Re: Ptr and ForeignPtr Questions

2001-09-21 Thread Manuel M. T. Chakravarty

Ashley Yakeley [EMAIL PROTECTED] wrote,

 At 2001-09-20 19:32, Manuel M. T. Chakravarty wrote:
 
 What I meant with the remark that you quote is that if you
 would use
 
   foreign import foo :: Ptr Int - IO Float
 
 with
 
   float foo (float *x)
   {
 return *x;
   }
 
 the system will not complain, but your program may dump
 core.
 
 What if the C looked like this:
 
   float foo (int *x)
   {
 return *x;
   }
 
 ...?

That's ok.  All I am saying is that the FFI doesn't ensure
any concistency between the Haskell and the C type.

Manuel

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: Ptr and ForeignPtr Questions

2001-09-21 Thread Manuel M. T. Chakravarty

Ashley Yakeley [EMAIL PROTECTED] wrote,

 At 2001-09-21 01:39, Manuel M. T. Chakravarty wrote:
 
 That's ok.  All I am saying is that the FFI doesn't ensure
 any concistency between the Haskell and the C type.
 
 Well it can't can it? There's no type information in object-code symbols 
 (unless you use C++ identifier mangling, which Haskell doesn't).

One could attempt to generate C prototypes from the Haskell
type declarations or similar things, btu it doesn't work
out.

Manuel

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



unterminated {-

2001-09-21 Thread George Russell

Seems to me it would make more sense for the message
.hs:214: unterminated `{-'
message to tell me where the {- is, rather than where the EOF is.

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: Alternative Design for Finalisation

2001-09-21 Thread Ashley Yakeley

At 2001-09-21 09:40, Marcin 'Qrczak' Kowalczyk wrote:

 (apologies for the different spelling of finalize - apparently both are
 correct and I randomly settled on the 'z' version some time ago).

I guess 's' is British and 'z' is American.

Chambers (of Cambridge, England) has both.

-- 
Ashley Yakeley, Seattle WA


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



GHC 5.02 is released

2001-09-21 Thread Julian Seward (Intl Vendor)


   
The (Interactive) Glasgow Haskell Compiler -- version 5.02
   

We are pleased to announce a new major release of the Glasgow Haskell
Compiler (GHC), version 5.02.  

This is the first version of GHC that has all of the following:

  * An interactive read-eval-print loop, similar to Hugs.
You can load a mixture of compiled and interpreted modules;
in particular, you automatically use the precompiled libraries,
so your interpreted programs often run pretty fast.

  * Works solidly on Windows platforms.  Installation is simple
(Installshield); you don't have to install anything else; 
and GHC does not get confused if you also happen to 
have (say) Cygwin installed.

  * Implements the changes adopted for the (now almost finalised)
Revised Haskell 98 Language and Library Reports.

  * The ability to emit External Core, a documented typed 
intermediate language, suitable for slurping up into other
tools.  [Andrew Tolmach's work.]

  * A particularly thorough pre-release test programme.
Some releases are more solid than others; this one is
at the solid end of the spectrum.  We fondly hope.

So if you have been waiting to upgrade your GHC 4.08, this is 
the moment. 


How to get it
~
The easy way is to go to the WWW page, which should be self-explanatory:

http://www.haskell.org/ghc/

We supply binary builds in the native package format for various
flavours of Linux and BSD, and in InstallShield form for Windows
folks.  Everybody else gets a .tar.gz which can be installed where you
want.

Once you have the distribution, please follow the pointers in the
README file to find all of the documentation about this release.

The source distribution is freely available via the World-Wide Web,
under a BSD-style license.  See below for download details.  Pre-built
packages for Linux, FreeBSD, Solaris and Win32 are also available.


More details about what's new
~

5.02 incorporates many small refinements and bug fixes over the previous

stable release (5.00.2).  There are no major language changes.

   - Implements Haskell 98 (revised)

   - Ability to emit External Core.  GHC can't read External Core
 back in.  Yet.

   - Much improved support for Windows platforms.  Binary builds are
 now entirely freestanding.  There's no need to install Cygwin or
 Mingwin to use it.  It's a one-click-install-and-off-you-go story
now.

   - Several small changes to bring GHC into line with the newest
Haskell 98 
 report.

   - GHCi (the interactive system) now works on Windows.

   - Partial FFI support in GHCi.  At the moment, foreign import (both
 static and dynamic) is supported on x86 and sparc platforms.

   - A compacting garbage collector, to try and reduce space use.

   - Ability to disconnect built-in numeric syntax from the supplied 
 Prelude. This allows you to define your own arithmetic packages,
 which Haskell98 doesn't quite support.

   - Experimental: partial support for hierarchical module names.

   - Experimental: following heroic hacking by Ken Shan, 5.02 now
 works on Alpha (Tru64 only).  Many 64-bit bugs have been shaken
 out.  At the moment only the batch-mode compiler works -- no GHCi
 or native code generator yet.

We've found and fixed more bugs than you could possibly imagine.  A
big thank-you to all those who reported bugs in the 5.00.X series.  We
claim to have fixed almost all reported bugs.  In general we've spent
a large amount of effort trying to improve the stability of the
system relative to 5.00.X.  (Famous last words ...)

For full details see the release notes:

http://www.haskell.org/ghc/docs/5.02/set/release-5-02.html


Background
~~
Haskell is a standard lazy functional programming language; the
current language version is Haskell 98, agreed in December 1998.

GHC is a state-of-the-art programming suite for Haskell.  Included is
an optimising compiler generating good code for a variety of
platforms, together with an interactive system for convenient, quick
development.  The distribution includes space and time profiling
facilities, a large collection of libraries, and support for various
language extensions, including concurrency, exceptions, and foreign
language interfaces (C, whatever).

A wide variety of Haskell related resources (tutorials, libraries,
specifications, documentation, compilers, interpreters, references,
contact information, links to research groups) are available from the
Haskell home page at

http://www.haskell.org/

GHC's Web page lives at

http://www.haskell.org/ghc/


On-line GHC-related resources
~~

Relevant URLs on the World-Wide Web:

GHC home page http://www.haskell.org/ghc/
Haskell home page http://www.haskell.org/