Re: ghc on Win32

2000-08-07 Thread Zhanyong Wan

Matthias,

 I've just installed ghc-4.08 / binary release for Win32.

 When compiling a file Type.hs, the following happens:

 START
 Compiling Type.hs

 does not exist
 Action: openFile
 Reason: file does not exist /tmp/ghc1096.cpp
 END

I had the same problem, until I read the following from
http://www.haskell.org/ghc/docs/latest/set/book-users-guide.html :

##

Furthermore, it seems that TMPDIR must be set to a directory in the same
file system in which you invoke GHC. Otherwise you get very werid
messages when you invoke GHC, such as: does not exist
Action: openFile
Reason: file does not exist /tmp/ghc11068.cpp

We think this is due to a bug in Cygwin.

##

So if your source file is in d:/src, and your TMPDIR is c:/tmp, you
probably need to:

cd c:
path/to/ghc/bin/ghc //d/src/Type.hs

--
Zhanyong Wan
Dept of Computer Science, Yale University





form of class constraints

2000-08-07 Thread Zhanyong Wan

I'm using the GHC 4.08 binary distribution on Windows.

According to the Haskell 98 report, class constraints are of the form C
(a t1 ... tn), where C is a class, a is a type variable, and t1, ..., tn
are arbitrary types (including type variables, n = 0).  However, the
following code failed to compile:

##
module Test where

newtype StateT s t b x = StateT (s - t b (s, x))
instance Functor (t b) = Functor (StateT s t b)
##

Illegal constraint `Functor (t b)' in instance context
(Instance contexts must constrain only type variables)

I have no problem with the same code in Hugs.  Is this a GHC bug?

--
Zhanyong Wan
Dept of Computer Science, Yale University







Time profiling interval?

2000-08-07 Thread Alastair Reid


While trying to generate a heap profile for a large run, I was getting
lots of floating point exceptions when running hp2ps.  Normally, I'd
have used "+RTS -i5" (or the like) to reduce the number of samples
being generated (which, I think, avoids the heap overflow and would
also reduce runtime to an acceptable amount).

So, the question is: how do I set the profiling interval?
(btw the online users guide still documents the -i flag)


-- 
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/