Re: brain explosion in polymorphic state monad

2002-10-10 Thread Hal Daume III
I'm not sure why it's doing that, but you can see (and fix!) the same problem in a simpler case: data Foo a = forall b . Foo a b foo (Foo a _) f = let Foo _ b = f a in Foo a b This causes the same error. Presumably this has to do with the compiler worrying about escaping variables or

brain explosion in polymorphic state monad

2002-10-10 Thread mathieu
Hello, I am trying to define a polymorphic state monad using glasgow extensions and I got a brain explosion of ghc when i try to compile it. Here is the code : newtype StateT s m a = MkStateT (s -> m (a, s)) instance Monad m => Monad (StateT s m) where return x = MkStateT (\s -> return (x,

non-termination during compilation

2002-10-10 Thread Christian Maeder
Hi, the following example causes ghc to loop (or run rather long): --- snip --- data U = MkU (U -> Bool) russel :: U -> Bool russel u@(MkU p) = not $ p u x :: Bool x = russel (MkU russel) --- snip --- I think, a compiler should always terminate, shouldn't it!? Compilation succeeds for

Re: ObjectIO Library

2002-10-10 Thread Sigbjorn Finne
Hi there, leaving it out of the 5.04.1 installer was unintended, esp. since 5.04 had it included. I'll make sure it makes a re-appearance in 5.04.2 (or whatever the next GHC release ends up being named.) --sigbjorn - Original Message - From: Alfonso To: [EMAIL PROTECTED] Sent: Tuesday, O

Re: ghc --make and static libraries (SOLUTION)

2002-10-10 Thread Martin Norbäck
tor 2002-10-10 klockan 14.02 skrev Martin Norbäck: > How do I go about linking to a static library when using --make? > > If i do > > ghc --make Module libmodulelib.a > > then ghc syas: > > chasing modules from Module,libmodulelib.a and complains about not being > able to find the _module_ mod

RE: ObjectIO Library

2002-10-10 Thread Simon Peyton-Jones
 I have the information that The  library ObjectIO is included in  the ghc.5.0.4 version, unfortunately I download the msi file for windows  (ghc-5-04-1.msi) and the library does not appear in the imports directory after the installation. Have I the wrong information?  Do I need to downlo

ghc --make and static libraries

2002-10-10 Thread Martin Norbäck
How do I go about linking to a static library when using --make? If i do ghc --make Module libmodulelib.a then ghc syas: chasing modules from Module,libmodulelib.a and complains about not being able to find the _module_ modulelib.a. Likewise on windows, if I do ghc --make Module modulelib.dll

Re: Building Both "Regular" and "Profiling" Libraries

2002-10-10 Thread Ashley Yakeley
At 2002-10-10 01:23, Ketil Z. Malde wrote: >Ashley Yakeley <[EMAIL PROTECTED]> writes: > >> I did notice that for -osuf you seem to need the '.' but for -hisuf you >> don't... > >Weird, I've never seen that behavior (GHC 5.02 and 5.04, x86-Linux and >Sparc-Solaris). I just checked with 5.04 on

Re: Building Both "Regular" and "Profiling" Libraries

2002-10-10 Thread Ketil Z. Malde
Ashley Yakeley <[EMAIL PROTECTED]> writes: > I did notice that for -osuf you seem to need the '.' but for -hisuf you > don't... Weird, I've never seen that behavior (GHC 5.02 and 5.04, x86-Linux and Sparc-Solaris). I just checked with 5.04 on my Linux box, and 5.02 on a Sun, just to make sure.