cvs commit: hugs98/libraries/Hugs ConcBase.hs Exception.hs
IOExts.hs Prelude.hs System.hs hugs98/src array.c bignums.c builtin.c
compiler.c connect.h hugs.c iomonad.c machine.c printer.c server.c type.c
hugs98/src/unix convert_libraries
ross@glass.cse.ogi.edu
ross@glass.cse.ogi.edu
Thu, 23 Jan 2003 09:47:09 -0800
ross 2003/01/23 09:47:09 PST
Modified files:
libraries/Hugs ConcBase.hs Exception.hs IOExts.hs
Prelude.hs System.hs
src array.c bignums.c builtin.c compiler.c
connect.h hugs.c iomonad.c machine.c
printer.c server.c type.c
src/unix convert_libraries
Log:
Switch to the general Exception representation used in fptools/libraries.
The old representation of exceptions was
data Exception = IOException IOError | HugsException HugsException
where IOErrors are passed to a failure continuation and printed using
Show. HugsExceptions are redexes that caused an error, triggering
a longjmp. If not caught, they get printed by the internal printer,
e.g. {primDivInt 1 0}. Now:
* the Exception type is copied from Control.Exception, which sadly makes
the Prelude a bit bigger; there are no HugsExceptions.
* all Exceptions trigger a longjmp, are caught by runAndShowError
and printed using Show, e.g. "divide by zero" -- less information,
but more friendly. As a result, +f (failOnError) now has no effect,
although -u still works (slightly differently).
* all of Control.Exception bar throw(Dyn)To works with Hugs.
* the failure continuation in the IO type is unused, though it's still
there for now.
* now that exitWith throws an ExitException, an exitWith in a thread other
than the main one is reported (like any other exception) but doesn't
cause the program to terminate. The other behaviour is possible,
but this is what GHC does.
Revision Changes Path
1.10 +4 -6 hugs98/libraries/Hugs/ConcBase.hs
1.6 +28 -59 hugs98/libraries/Hugs/Exception.hs
1.8 +7 -31 hugs98/libraries/Hugs/IOExts.hs
1.17 +147 -40 hugs98/libraries/Hugs/Prelude.hs
1.7 +1 -12 hugs98/libraries/Hugs/System.hs
1.6 +15 -10 hugs98/src/array.c
1.7 +5 -5 hugs98/src/bignums.c
1.43 +54 -55 hugs98/src/builtin.c
1.13 +4 -4 hugs98/src/compiler.c
1.60 +19 -2 hugs98/src/connect.h
1.113 +8 -6 hugs98/src/hugs.c
1.39 +3 -3 hugs98/src/iomonad.c
1.13 +18 -16 hugs98/src/machine.c
1.8 +34 -34 hugs98/src/printer.c
1.27 +6 -2 hugs98/src/server.c
1.62 +39 -12 hugs98/src/type.c
1.49 +1 -2 hugs98/src/unix/convert_libraries