FLO:DEFAULT-ENVIRONMENT must be reinitialized after the band is restored, since the...
authorChris Hanson <org/chris-hanson/cph>
Mon, 17 Oct 2011 08:21:36 +0000 (01:21 -0700)
committerChris Hanson <org/chris-hanson/cph>
Mon, 17 Oct 2011 08:21:36 +0000 (01:21 -0700)
src/runtime/floenv.scm

index a6d92f331b194c34e838400ff9a8f584c5b465e3..618e708b763be79c65b3fecaa98ce01d9a7e0dbc 100644 (file)
@@ -70,7 +70,7 @@ USA.
 (define (flo:default-environment)
   default-environment)
 
-(define (initialize-package!)
+(define (reset-package!)
   (set! default-environment
        (let ((environment (flo:environment)))
          (flo:set-rounding-mode! (flo:default-rounding-mode))
@@ -80,6 +80,10 @@ USA.
            (flo:set-environment! environment)
            environment*)))
   unspecific)
+
+(define (initialize-package!)
+  (reset-package!)
+  (add-event-receiver! event:after-restore reset-package!))
 \f
 (define-primitives
   (float-rounding-modes 0)