1 (* Copyright (C
) 1999-2006 Henry Cejtin
, Matthew Fluet
, Suresh
2 * Jagannathan
, and Stephen Weeks
.
3 * Copyright (C
) 1997-2000 NEC Research Institute
.
5 * MLton is released under a BSD
-style license
.
6 * See the file MLton
-LICENSE for details
.
9 structure Cleaner
: CLEANER
=
12 type t
= (unit
-> unit
) list ref
14 fun new (): t
= ref
[]
16 fun addNew (cs
, f
) = cs
:= f
:: (!cs
)
18 fun clean cs
= app (fn c
=> c () handle _
=> ()) (!cs
)
22 val atLoadWorld
= new ()