[Haskell-cafe] Newbie question about Read strings in a line of File

2005-07-26 Thread Huong Nguyen
Hello everybody, Now I am writing a module to handles messages of a system. The messages are stored in a file. The content of each line of the file likes this: 1001 001 Error message 1 1001 002 Error message 2 1002

Re: [Haskell-cafe] Newbie question about Read strings in a line of File

2005-07-26 Thread Cale Gibbard
Here's how I wrote it: - beginning of file import IO -- turn a line of the text file into a pair consisting of -- the message triple and the message string -- slight bug: will contract multiple spaces in the message string -- This could be rewritten to avoid this problem, but couldn't make