Converting from Haskell 1.2 to 1.4

Haskell 1.4 (the differences is really between 1.2 and 1.3) has some substantial differences compared to Haskell 1.2. Here is a short guide how to convert your programs without too much pain.

I/O

The most radical change is the I/O system. You should really convert to the new more powerful I/O system. It is described in the Haskell report.

If you feel really lazy you can use the old I/O with compatibility libraries. To do this you should add one of these imports:

    import DialogueIO
    import ContinuationIO
and convert the old main function like this
main = dialogueToIO oldmain

class Text

The class Text has been split into the classes Read and Show. If you do not use any reading (few people do :-) all you need to do is to change Text to Show everywhere.

Arrays

The syntax of associations have changed and arrays have been moved into a separate library. Change all occurences of ``x := e'' to ``(x, e)'' and do a
    import Array

Old Prelude functions

Some prelude functions have moved into libraries. You need to add imports of these if you have used any of them.

Some Prelude entities are gone and replaced by more general ones.

New Prelude stuff

There are some new useful things in the Prelude that previously needed to be imported from libraries.

HBC libraries

All of the functionality of the old HBC libraries is still there, but some of the functions have changed named to adhere to the new upcoming library standard and to avoid clashes with the new Prelude. Consult the library documentation and HBC library documentation to find out more. To get the trace function you need to do
    import NonStdTrace

Last modified: Thu Jan 30 12:38:26 MET 1997