Go to the first, previous, next, last section, table of contents.

Use of the standard Prelude

As with any previous Prelude/standard-modules changes, if you have top-level functions that name-clash with imported entities, you'll get compiler errors. So, for example, if your code defines a function called `seq' (entirely cool in Haskell 1.2), you will now get a compiler error because there is now a Prelude entity called `seq'. (You may, of course, `import Prelude hiding (seq)', if you wish). Names that frequently clash with new Prelude names: `fail', `lookup', `seq'. Add `import Ratio' if you use `Rationals' at all. Ditto: `import Complex' if you use complex numbers. Ditto: `import Array' if you use arrays. As suggested above, any `LibXXX' system modules are now just `XXX'. Also: note that Arrays now use ordinary pairs, rather than a separate `Assoc' type. In some modules, we've found it easier to do:
infix 1 =:
(=:) a b = (a,b)
and globally replace `:=' with `=:'. Works fine for expressions; useless for patterns, however. For `minInt'/`maxInt' and `minChar'/`maxChar', use the `Bounded' class methods, `minBound' and `maxBound'. Replace class `Text' with `Show'; on rare occasions, you may need to do something for `Read', too. The functions `ord' and `chr' have been replaced by the class methods `fromEnum' and `toEnum', respectively. The changes, however, can lead to ambiguous overloading. The functions `even' and `odd' used to be methods of class `Integral'. They are now ordinary, overloaded functions. The `print' function now appends a newline to its output. This is good, but different. `readDec' no longer exists; use `(reads::ReadS Int)', or similar. If you relied on `take', `drop', `splitAt', etc., being overloaded, you will need to switch to `genericTake', `genericDrop', etc., (imported from `List').
Go to the first, previous, next, last section, table of contents.