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
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