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 sim

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 directi

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 stan

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 n

Re: Portability dreams

1999-05-28 Thread Kevin Atkinson
Sven Panne wrote: > > 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: W

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 proble

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 bot

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: how to write a simple cat

1999-05-28 Thread Hannah Schroeter
Hello! On Fri, May 28, 1999 at 08:00:27AM +0200, 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? import System(getArgs) file2stdout :: String {- filename -} -> IO () file2stdout

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 Simon Marlow
Picking up on a few of the points that Sven made: >* There is no really portable way to level those language > differences. IMHO, piping Haskell through cpp is a hack and has > its own problems: nhc13 defines __HASKELL_98__, GHC > __HASKELL98__; > nhc13 defines __HASKELL__=3,

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