RE: different behaviour of ghc-4.02 and ghc-pre-4.03

1999-05-28 Thread Simon Peyton-Jones
It seems to work ok in my copy, which is in the repository. Various libraries weren't quite right until recently, so I think you'll find it's ok now. (But you'll need to use CVS to get an up to date copy until we make a proper release.) Thanks for the report Simon -Original Message-

different behaviour of ghc-4.02 and ghc-pre-4.03

1999-05-28 Thread Michael Weber
Hi! Consider the following program: data Msg = Value Int | Inc deriving (Show, Read) main = do let v = read "Value 7"::Msg print v When compiled with ghc-4.02, everything's fine, it outputs "Value 7" as expected. But compiled with ghc-pre-4.03 it yields this

RE: Portability dreams

1999-05-28 Thread Simon Peyton-Jones
[...] What you're really saying is: "if the libraries that you compiled your program against change, you have to recompile your program." Not doing this is dodgy at best, even for C. Sven Panne: Huh? Doing this perfectly fine, see Giuliano's mail. Let me elaborate: you can't link

RE: Portability dreams

1999-05-28 Thread Simon Marlow
[ moved to glasgow-haskell-users from haskell ... ] Simon Marlow: [...] What you're really saying is: "if the libraries that you compiled your program against change, you have to recompile your program." Not doing this is dodgy at best, even for C. Sven Panne: Huh? Doing this perfectly

how to write a simple cat

1999-05-28 Thread Friedrich Dominicus
I wrote before with my trouble understanding hugsIsEOF. But I don't have found a clean way just to write a cat. Can s.o give me a hand? Regards Friedrich

Re: Portability dreams

1999-05-28 Thread Kevin Atkinson
Sven Panne wrote: * If you upgrade your version of GHC, its libraries change in such a way that you have to recompile all your code: A compiler-generated entity (ds42, lvl1, tpl60, ...) from one version can mean quite a different thing in the next. Compare this with C

Re: how to write a simple cat

1999-05-28 Thread David Overton
On Fri, May 28, 1999 at 04:00:27PM EST, Friedrich Dominicus wrote: I wrote before with my trouble understanding hugsIsEOF. But I don't have found a clean way just to write a cat. Can s.o give me a hand? Hi, You shouldn't need to use hugsIsEOF. Here's one possible implementation of a

Re: how to write a simple cat

1999-05-28 Thread Keith Wansbrough
module Main ( main ) where import IO import System main :: IO () main = do args - getArgs s - case args of []- getContents [inF] - readFile inF _ - fail "Sorry, only 0 or 1 args implemented" putStr s --KW 8-) -- :

Re: Portability dreams

1999-05-28 Thread Giuliano Procida
On Thu, May 27, 1999 at 03:51:57PM +0200, Sven Panne wrote: Using Haskell programs and libraries with different compilers and/or interpreters (or even with different versions of the same system!) is currently quite a frustrating experience. This is can be attributed to the following problems:

Re: Portability dreams

1999-05-28 Thread Sven Panne
Simon Marlow wrote: [...] We (GHC) are compatible with hbc in this area I think - hbc defines __HASKELL1__=3 for Haskell 1.3, we define __HASKELL1__=5 and __HASKELL98__. Hmmm, I must have missed the equation Haskell 1.5 = Haskell 98 somehow...:-) [...] I don't see a problem with

Re: Portability dreams

1999-05-28 Thread Malcolm Wallace
Sven Panne writes: Using Haskell programs and libraries with different compilers and/or interpreters (or even with different versions of the same system!) is currently quite a frustrating experience. I agree. And as the current maintainer of one of the Haskell systems, I'd like to work both

Re: Portability dreams

1999-05-28 Thread Sven Panne
\begin{sarcasm} Malcolm Wallace wrote: [...] all 1.3/1.4 code should be converted or thrown away. HaXml? ;-)) [...] so one compiler writer has no idea what another compiler writer is using, "man grep" :-) [...] For another, you have chosen to use deliberately preprocessor directives.

Re: Portability dreams

1999-05-28 Thread Sven Panne
Kevin Atkinson wrote: [...] C++ stores type information in the symbol to resolve overloading. Ghc might do a similar thing. Than again Haskell overloading is nothing like C++ overloading so maybe not. There's nothing wrong with this kind of name mangling: When the library is updated, the