Re: New Patches Binary for MacOS X

2002-04-18 Thread Ashley Yakeley

At 2002-04-15 12:29, Wolfgang Thaller wrote:

The binary package for MacOS X is now available at
http://www.kfunigraz.ac.at/imawww/haskell/GHC.dmg

It fails to build TypedObject.hs.

$ /usr/local/bin/ghc -fvia-C -pgmccc -pgmacc -package lang -package 
concurrent -fglasgow-exts -fallow-undecidable-instances -package-name 
javavm -c TypedObject.hs -o TypedObject.o +RTS -K20m
stack overflow: use +RTS -Ksize to increase it

TypedObject.hs is this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/jvm-bridge/sourc
e/Haskell/TypedObject.hs?rev=1.6

Actually, what I recommend you do is fetch JVM-Bridge from CVS and build 
it yourself. It's quite straightforward.

Go here to find it:
http://sourceforge.net/cvs/?group_id=32318

Follow the instructions in source/Building.


-- 
Ashley Yakeley, Seattle WA

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



Re: ghc-pkg info

2002-04-18 Thread Wolfgang Thaller

[...] readlink -f `which ghc` and get it from there, but that fails with
the latest MacOS X version because it uses small shell scripts in unusual
places instead of symlinks.

Those shell scripts were installed by a standard make install, so I 
expect them to be there for any platform - it has nothing to do with 
MacOS X.

Regards,

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



Re: ghc-pkg info

2002-04-18 Thread Ashley Yakeley

At 2002-04-18 02:37, Wolfgang Thaller wrote:

Those shell scripts were installed by a standard make install, so I 
expect them to be there for any platform - it has nothing to do with 
MacOS X.

Must be a new thing in the source. Your previous port of 5.03 had 
symlinks there.

-- 
Ashley Yakeley, Seattle WA

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



Heap profiling

2002-04-18 Thread Ketil Z. Malde


Hi,

I really like the profiling options in GHC, but I wonder if there's
any good way of improving heap profiling speed?  I've tried using -i
to reduce the number of measurements, but it didn't seem to help a
lot.  

I see an order of magnitude speed degradation with heap profiling,
which is slightly annoying, since it is with large runs heap
consumption starts to become troublesome :-)

Any tricks I ought to know about?

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: handling of multibyte char strings

2002-04-18 Thread Simon Marlow

 GHC 5.02.[23] seems to be quite strict about literal strings
 in source code.  I presume this is a feature. :-)  However
 this is annoying for people who want to use wide chars in
 strings in source code.  (Though I realise that doing so is
 not very portable.)
 
 To illustrate, the following program
 
 main :: IO ()
 main =
 let ja = 'Japanese character' in putChar ja  putChar '\n'
 
 results in
 
 Compiling Main ( test-ja.hs, interpreted )
 test-ja.hs:3: error in character literal
 Failed, modules loaded: none.
 
 with both ghc and ghci.

As other folk noted, you should be fine with ISO8859-1 characters but we
don't have support for Unicode yet.  There has been discussion at
various points in the past on how to do this, and Marcin Kowalczyk has
some ideas on how the Haskell interface to multi-coded text I/O should
look.

It is possible that we could just support UTF-8 in source files without
going the whole hog and providing Unicode I/O, however.  As usual,
contributions are welcome :-)

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



RE: building with make -j2 ?

2002-04-18 Thread Simon Marlow

 Simon Marlow [EMAIL PROTECTED] writes:
 
  The snapshot source distribution has now been updated to include the
  file mk/package.mk which was missing the first time around.
 
 Thanks.
 
 Btw, does ghc build with make -j2?  I tried building the
 snapshot just now with it but got a make error at some
 point.  I forget to save the build log, but I can easily
 fire up another build if you want to see it.

You should be able to use -jN in ghc/compiler (indeed, I use this
regularly) but I haven't been through and fixed up the rest of the tree
to work with -jN yet.

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



RE: -O2

2002-04-18 Thread Simon Marlow


 In my program I observe that, with -O2 flag turned on, 
 Program 1 behaves
 like Program 2. And without O2, their outputs are different.
 
 Is it the desirable behaviour? For my program, I did not expect the
 optimizer to do this transformation.

-O2 should not change the behaviour of the program, except where the
behaviour is dependent on external factors (eg. I/O) or when the program
uses unsafePerformIO.  If that's not the case, could you send us the
code so we can take a look?

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



RE: hsc2hs does not fail

2002-04-18 Thread Simon Marlow


 for some reason hsc2hs does not fail if the automatically generated
 program fails to execute. This only happends if I forget to set
 LD_LIBRARY_PATH before saying make. But it leads to a confusing error
 messages when an empty .hs file is left and ghc complaints 
 with file name
 does not match module name.
 
 The patch below was done against ghc-5.02.2 on FreeBSD.

Committed, thanks.

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



RE: New Patches Binary for MacOS X

2002-04-18 Thread Simon Marlow

 At 2002-04-15 12:29, Wolfgang Thaller wrote:
 
 The binary package for MacOS X is now available at
 http://www.kfunigraz.ac.at/imawww/haskell/GHC.dmg
 
 It fails to build TypedObject.hs.
 
 $ /usr/local/bin/ghc -fvia-C -pgmccc -pgmacc -package lang -package 
 concurrent -fglasgow-exts -fallow-undecidable-instances -package-name 
 javavm -c TypedObject.hs -o TypedObject.o +RTS -K20m
 stack overflow: use +RTS -Ksize to increase it

We had a problem with the typechecker looping that was fixed in CVS just
prior to the 20020410 snapshot - perhaps the MacOS binary snapshot
doesn't include this fix?

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



RE: Heap profiling

2002-04-18 Thread Simon Marlow

 I really like the profiling options in GHC, but I wonder if there's
 any good way of improving heap profiling speed?  I've tried using -i
 to reduce the number of measurements, but it didn't seem to help a
 lot.  
 
 I see an order of magnitude speed degradation with heap profiling,
 which is slightly annoying, since it is with large runs heap
 consumption starts to become troublesome :-)
 
 Any tricks I ought to know about?

Have you tried one of the recent snapshots?  Heap profiling was
overhauled significantly since the 5.02 branch, and one of the things I
did was to make the -i option work better.  Previously profiling was
forced to use the 2-space collector, but now it can use generational
collection and just force a major GC before it does a heap census.

If you're stuck with 5.02.x, you can try increasing the size of the
allocation area with (say) -A4m to increase the time between garbage
collections.

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



Re: ANNOUNCE: GHC 5.03.20020410 snapshot released

2002-04-18 Thread Ralf Hinze

Am Donnerstag, 18. April 2002 14:12 schrieb Simon Marlow:
  Ralf Hinze [EMAIL PROTECTED] writes:
   BTW, does this version support rank-n types?
 
  IIRC the previous snapshot did.  So presumably this one does
  too?

 Yes, it does.

 Simon

That's what I feared ;-). Ok, here is my first attempt at defining
a rank-3 function (code attached). ghci responds
---
ralf/Haskell ghci -v -fglasgow-exts Rank3.lhs
   ___ ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |  GHC Interactive, version 5.03.20020410, for Haskell 
98.
/ /_\\/ __  / /___| |  http://www.haskell.org/ghc/
\/\/ /_/\/|_|  Type :? for help.

Glasgow Haskell Compiler, Version 5.03.20020410, for Haskell 98, compiled by 
GHC version 5.03.20020410
...
*** Typechecker:

Rank3.lhs:20:
Illegal polymorphic type: forall b1 b2.
  (b1 - b2) - h1 f1 b1 - h2 f2 b2
In the type: forall h1 h2 a1 a2.
 (forall f1 f2.
  (forall c1 c2. (c1 - c2) - f1 c1 - f2 c2)
  - forall b1 b2. (b1 - b2) - h1 f1 b1 - h2 f2 b2)
 - (a1 - a2) - HFix h1 a1 - HFix h2 a2
While checking the type signature for `mapHFix'
---
Do I have to hoist the forall quantifiers in bla - forall a . blub myself? At
least, the code typechecks then.

Cheers, Ralf




ghci -v -fglasgow-exts Rank3.lhs

 data Fork a   =  ForkC a a

 mapFork   :: forall a1 a2 . (a1 - a2) - (Fork a1 - Fork a2)
 mapFork mapA (ForkC a1 a2)=  ForkC (mapA a1) (mapA a2)

 data SequF s a		=  EmptyF | ZeroF (s (Fork a)) | OneF a (s (Fork a))

 newtype HFix h a		=  HIn (h (HFix h) a)

 type Sequ =  HFix SequF

 mapSequF  :: forall s1 s2 . (forall b1 b2 . (b1 - b2) - (s1 b1 - s2 b2))
 - (forall a1 a2 . (a1 - a2) - (SequF s1 a1 - SequF s2 a2))
 mapSequF mapS mapA EmptyF	=  EmptyF
 mapSequF mapS mapA (ZeroF as) =  ZeroF (mapS (mapFork mapA) as)
 mapSequF mapS mapA (OneF a as)=  OneF (mapA a) (mapS (mapFork mapA) as)

 mapHFix   :: forall h1 h2 . (forall f1 f2 . (forall c1 c2 . (c1 - c2) - (f1 c1 - f2 c2))
 - (forall b1 b2 . (b1 - b2) - (h1 f1 b1 - h2 f2 b2)))
 - (forall a1 a2 . (a1 - a2) - (HFix h1 a1 - HFix h2 a2))
 mapHFix mapH mapA (HIn v) =  HIn (mapH (mapHFix mapH) mapA v)

 mapSequ   :: forall a1 a2 . (a1 - a2) - (Sequ a1 - Sequ a2)
 mapSequ			=  mapHFix mapSequF

 main=  putStrLn hello world