Re: [Haskell-cafe] newbie - IO issues (of course)

2006-06-24 Thread Bulat Ziganshin
Hello Geoffrey, Saturday, June 24, 2006, 8:38:31 AM, you wrote: getInt :: IO Int getInt = do putStr Enter number (zero to quit) line - getLine return (read line :: Int) this procedure is fine, although there is specific function to read data of any type,

[Haskell-cafe] Binary IO

2006-06-24 Thread jeff lasslett
Greetings,I am considering writing -in Haskell of course - a small program to translate binary files to human readable text.The trouble is that I can find no easily digestible tutorial style info on how to do binary IO in Haskell. I have read about some of the libraries that people have created to

Re: [Haskell-cafe] newbie - IO issues (of course)

2006-06-24 Thread Stepan Golosunov
On Sat, Jun 24, 2006 at 02:38:31PM +1000, Geoffrey King wrote: I have been work my way through Haskell The Craft of Functional Programming, all was fine until IO (chapter 18). That is causing me bafflement. I am trying to write a totally trivial program that reads a series of integers

Re: [Haskell-cafe] Binary IO

2006-06-24 Thread Donald Bruce Stewart
m4d.skills: Greetings, I am considering writing -in Haskell of course - a small program to translate binary files to human readable text. The trouble is that I can find no easily digestible tutorial style info on how to do binary IO in Haskell. I have read about some of

Re: [Haskell-cafe] Binary IO

2006-06-24 Thread Bulat Ziganshin
Hello jeff, Saturday, June 24, 2006, 10:19:17 AM, you wrote: I would greatly appreciate it if someone could post a small example or two illustrating how to do binary IO in Haskell using the most widely used binary IO lib (if there is such a thing).  Failing that, I would appreciate a link

Re: [Haskell-cafe] ReadP and MonadFix

2006-06-24 Thread Gracjan Polak
Thanks for your response! I searched for something more found: An Abstract Monadic Semantics for Value Recursion, Eugenio Moggi, Amr Sabry http://citeseer.ist.psu.edu/moggi03abstract.html Section 4 of this paper says something about References and Continuations. But it will be quite hard to

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-24 Thread Paul Hudak
Stepan Golosunov wrote: 1:_|_ is certainly finite. And what is length _|_ ? _|_, of course!! :-) The point being, length is well-defined only for total lists; it is undefined for partial lists. But this doesn't mean that a partial list isn't finite. What is finite list then? Is ones =