From atze@cs.uu.nl Mon Dec 4 15:24:17 2000 Date: Mon, 4 Dec 2000 16:24:17 +0100 From: Atze Dijkstra atze@cs.uu.nl Subject: Fwd: Re: Hugs and Mac and GUI
>>In addition, the new MacOS X is coming along, aleady existing in a beta
>>version with GCC available. There appears to be no point in doing any more
>>development for pre-MacOS X, and in addition, the development will probably
>>focus on Hugs STG/GHC.

Compiling Hugs on MacOS X is no problem, that is, it runs after compiling and installing with the standard pre-beta macosx developer tools. GHC is a bit more of a problem; I am currently busy trying to port GHC (with help from the GHC team). So stay tuned.
-- 

                - Atze -

Atze Dijkstra,  Dept.  of  Computer  Science, Utrecht University    /|\
Tel.: +31-30-2534093/1454 | WWW  : http://www.cs.uu.nl/~atze       / | \
Fax : +31-30-2513971      | Email: atze@cs.uu.nl                  /--|  \
                                   atze.dijkstra@hetnet.nl       /   |___|



From haberg@matematik.su.se Tue Dec 5 09:49:46 2000 Date: Tue, 5 Dec 2000 10:49:46 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Fwd: Re: Hugs and Mac and GUI
At 16:24 +0100 0-12-04, Atze Dijkstra wrote:
>Compiling Hugs on MacOS X is no problem, that is, it runs after compiling
>and >installing with the standard pre-beta macosx developer tools. GHC is
>a bit more >of a problem; I am currently busy trying to port GHC (with
>help from the GHC >team). So stay tuned.

This sounds great. I have a long time ago compiled Hugs with GCC under the
Tenon Mach/BSD, similar to the combination of MacOS X, and as I recall, it
compiled without a hitch.

So the "biggie" is what you can do with GHC: Any progress you can make
there is gratefully accepted.

If one wants to make a standalone Hugs with a GUI, then it might be
possible to strip out some of the stuff that we have done for the current
Mac Hugs. (For example, it will probably be interesting to experiment with
the MacOS high-level events.)

  Hans Aberg
                  * Email: Hans Aberg <mailto:haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>




From landauer@scruznet.com Thu Dec 7 10:27:27 2000 Date: Thu, 7 Dec 2000 11:27:27 +0100 From: Doug Landauer landauer@scruznet.com Subject: Fwd: Hugs on Mac with CW6 ? ... and Haskell Graphics Lib?
Hello, I was wondering whether you know if anyone has gotten
Hugs to compile on Mac OS 9, using CodeWarrior 6.  I am wanting
to get to know Haskell a little, and I have a copy of Paul
Hudak's book "The Haskell School of Expression", so I thought
it would be cool to run the book's examples on my Mac at home.

Unfortunately, I could not find any Mac port of the Haskell
Graphics Library.  So I decided it would make sense to
try to compile Hugs on the Mac.  Though I have known C
for decades (worked at Sun for 10 years, now Apple for just
over five), I'm a novice at using Codewarrior and at Mac
GUI programming in C.

It looks like Metrowerks may have changed some things
about the SIOUX interface and/or how stdarg.h works, in
between CW 5 and CW 6.   (I deduce this from my feeble
attempts at compiling and debugging a plain Hugs with CW 6.)

Once I can get a plain Hugs working with CW 6, I'm hoping to
try to figure out how to get it to interface to C, so I could
supply something like the Haskell Graphics Library and link
it in with Hugs.

So anyway, I have some specific questions:

 -- has anyone gotten Hugs to compile on Mac OS 9
     under CW 6?

 -- has anyone gotten Hugs+HGL to work on any Mac
     (OS 9 or OS X)?

 -- where should I look to figure out how the mac version
     of Hugs wants to interface with a C-based library?

 -- would it be easier to work with GHC or HBC instead of Hugs?
     (High speed is not a big concern of mine at the moment,
      I just want to learn and be able to play around with
      Haskell.)

Thanks in advance for any guidance you might be able to provide.
--
 -- Doug Landauer       landauer@scruznet.com (home)
                        landauer@apple.com (work)




From haberg@matematik.su.se Thu Dec 7 10:40:19 2000 Date: Thu, 7 Dec 2000 11:40:19 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs on Mac with CW6 ? ... and Haskell Graphics Lib?
>Hello, I was wondering whether you know if anyone has gotten
>Hugs to compile on Mac OS 9, using CodeWarrior 6.  I am wanting
>to get to know Haskell a little, and I have a copy of Paul
>Hudak's book "The Haskell School of Expression", so I thought
>it would be cool to run the book's examples on my Mac at home.

I have forwarded your letter to Johan Nordlander <nordland@cse.ogi.edu> who
is interested in implementing graphics on MacOS Hugs. -- I do not know
whether he is using CW Pro 5 or 6, though.

I'm & Pablo are currently using CW Pro 5, but feel free to use CW Pro 6 for
any contributions you make. -- If I continue using CW, I will probably
upgrade in the future.

-- If you are not currently subscribing to the Hugs-Users & Hugs_bugs
mailing lists, please do so <http://haskell.org/>, because the kind of info
you look for will be posted there.

> -- has anyone gotten Hugs to compile on Mac OS 9
>     under CW 6?

I would suggest you to try compile the sources I have for CW 5 under CW 6,
and see what breaks. Perhaps Johan has already done this. In these version,
I have implemented AppleEvent's using the AEGizmo's package, which might
interest you if you work at Apple -- I think a functional language light
Haskell might be suitable to describe the high level events.

> -- has anyone gotten Hugs+HGL to work on any Mac
>     (OS 9 or OS X)?

Yes, GCC is available under MacOS X, in Hugs compiles straight off, Atze
Dijkstra <atze@cs.uu.nl> reports to the Hugs-users mailing list. He is
currently working on GHC. There will (hopefully) be a interpreter GHCi
possibly replacing Hugs in the future(?), so this work in important.

-- I think myself that it is not really worth developing for pre-MacOS X,
and for MacOS X, it is perhaps better to simply use the freely available
GCC.

>It looks like Metrowerks may have changed some things
>about the SIOUX interface and/or how stdarg.h works, in
>between CW 5 and CW 6.   (I deduce this from my feeble
>attempts at compiling and debugging a plain Hugs with CW 6.)

The interface we use is that CW's SIOUX sources are duplicated and then
modified. So if it is not working under CW 6, it is probably because we
didn't put copies of all CW 5 SIOUX sources into the project.

Even though this is just a quick-fix way to develop the GUI, the components
could be used for developing an entirely new GUI. The SIOUX CW 5 windows
isn't a very good package, because it contains too many updates, isn't
thread safe. So it would be better to make an entirely new GUI. This is
probably an interesting topic, though time consuming, and I think one would
be better off developing a new GUI for MacOS X directly.

> -- where should I look to figure out how the mac version
>     of Hugs wants to interface with a C-based library?

There is something called HDirect, I think but I have never used it. When I
implemented the AppleEvent's via the AEGizmo's package, I did that via
strings. Then the problem to overcome is that Haskell is a lazy language,
so in order to retrieve the string for a C-program, the entry on the stack
must first be evaluated. So for that I stile some code I happened to find
somewhere in the Hugs package. The lack of such an interface for common
C-types seems to be a weakness of the current Hugs, but it is not so
difficult implementing the stuff if one only figures out how Hugs works.

Another problem with Hugs is that it is not thread-safe (pure, re-entrant),
so if one interrupts (say via an AppleEvent) the current evaluations to
execute some other Haskell code, you may end up with trouble (or, if you
are luck the code doesn't break.)

-- My wish is that if a new Haskell interpreter shows up, GHCi, or
whatever, it is going to be thread-safe in the sense that multiple Haskell
threads can be executed in parallel. This would be most important for
applications, such as executing AppleEvent's and such. But I do not know if
that is the plan for GHCi.

Otherwise, it was not so difficult making Hugs working with C-code.

> -- would it be easier to work with GHC or HBC instead of Hugs?
>     (High speed is not a big concern of mine at the moment,
>      I just want to learn and be able to play around with
>      Haskell.)

I do not know exactly what will happen in the future: For Mac's, it seems
most prudent to develop for MacOS X, as that is available already as a
beta. GHCi is said to arrive in the spring, so when that arrives, so will
be able to know. If Atze is making progress with GCC under MacOS X, that
will simplify matters, I think.

-- Perhaps somebody else can explain the exact differences between Hugs & GHCi.

-- As it is extremely time-consuming developing a MacOS GUI, probably also
under MacOS X, even though the situation would be better, I think it would
be great if people agree to different parts on the same MacHugs.

  Hans Aberg
                  * Email: Hans Aberg <mailto:haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>




From koen@cs.chalmers.se Mon Dec 11 11:34:15 2000 Date: Mon, 11 Dec 2000 12:34:15 +0100 (MET) From: Koen Claessen koen@cs.chalmers.se Subject: Garbage Collection
Hi all,

I seem to remember some Hugs module with an operation:

  garbageCollection :: IO ()

which cleaned up the memory. Now I need it, but I can't find
it. Did this function ever exist?

Koen.

--
Koen Claessen         http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424      mailto:koen@cs.chalmers.se
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden



From dkcombs@panix.com Mon Dec 11 16:22:53 2000 Date: Mon, 11 Dec 2000 11:22:53 -0500 (EST) From: dkcombs@panix.com dkcombs@panix.com Subject: http://www.cse.ogi.edu/PacSoft/projects/Hugs/pages/downloading.htm
The page mentioned in the subject line talks
about downloading a version for LINUX.

QUESTION: what about SOLARIS (7)?

It says NOTHING about unix *other than*
LINUX.

Also, what GRAPHICS are available?  The
book I have is Hudak's, ie all via graphics
examples, code, etc.

---

Please answer by email, since I am not (yet)
signed up for this mailing-list.

---

Also, please tell me HOW to sign up for the
mailing list.

Thanks!

David



From reid@cs.utah.edu Mon Dec 11 20:18:01 2000 Date: Mon, 11 Dec 2000 13:18:01 -0700 From: Alastair Reid reid@cs.utah.edu Subject: http://www.cse.ogi.edu/PacSoft/projects/Hugs/pages/downloading.htm
> The page mentioned in the subject line talks
> about downloading a version for LINUX.
> 
> QUESTION: what about SOLARIS (7)?

Hugs is very portable.  It works great on Solaris.
The source code is trivial to compile.  
>From memory, the instructions are:

  tar zxvf hugs.tgz
  cd hugs98/src/unix
  ./configure --prefix=$HOME/local --with-readline
  cd ..
  make install

> Also, what GRAPHICS are available?  The
> book I have is Hudak's, ie all via graphics
> examples, code, etc.

Again, the code (for the Hugs Graphics Library and Hudak's 
 School of Expression library) is available and is portable.
Just download it and compile.  (http://haskell.org/graphics)

If you'd prefer to use raw Xlib, the graphics lib includes
 an Xlib library.

Other libraries are available - see haskell.org for details.

--
Alastair Reid


From sigbjorn_finne@hotmail.com Tue Dec 12 11:40:45 2000 Date: Tue, 12 Dec 2000 12:40:45 +0100 From: Sigbjorn Finne sigbjorn_finne@hotmail.com Subject: Garbage Collection
Koen Claessen koen@cs.chalmers.se writes:
> Hi all,
> 
> I seem to remember some Hugs module with an operation:
> 
>   garbageCollection :: IO ()
> 
> which cleaned up the memory. Now I need it, but I can't find
> it. Did this function ever exist?

Yes, the functionality is available via IOExts.performGC

--sigbjorn