The ST library requires -98 option (was RE: Problem with the new beta)

Mark P Jones mpj@cse.ogi.edu
Fri, 9 Feb 2001 22:17:49 -0800


Hi Paul,

| I have just downloaded the new Hugs beta. There is a problem with=20
| the supplied ST module - :load ST gives an error,
|=20
| ...
| Reading file "C:\Data\HugsBeta\Hugs98\lib\exts\ST.hs":
| Parsing
| ERROR C:\Data\HugsBeta\Hugs98\lib\exts\ST.hs:48 - Syntax error=20
| in type expression (unexpected `.')

I suspect you are running Hugs in Haskell 98 mode.  As it says in
the Hugs manual:

  "Note that the ST and LazyST libraries cannot be used when
  the interpreter is running in Haskell 98 mode; the type for
  runST requires support for rank-2 polymorphism, which is only
  available in Hugs mode."

Try starting the interpreter with the command line option -98 if you
want to use the ST library.  I know that the error message above isn't
as clear as you might hope, but it is also difficult to do better in
Haskell 98 mode where "forall" is a perfectly legal type variable name,
and not a keyword.

All the best,
Mark