[project @ 2002-07-16 16:08:58 by ross]
[haskell-directory.git] / System / Mem / Weak.hs
index 85907b0..b51c9e2 100644 (file)
@@ -71,14 +71,15 @@ import Prelude
 
 import Data.Dynamic
 
+#ifdef __HUGS__
+import Hugs.Weak
+#endif
+
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.IOBase
 import GHC.Weak
 
-#include "Dynamic.h"
-INSTANCE_TYPEABLE1(Weak,weakTc,"Weak")
-
 {-|
 Dereferences a weak pointer.  If the key is still alive, then
 @'Just' v@ is returned (where @v@ is the /value/ in the weak pointer), otherwise
@@ -113,6 +114,8 @@ finalize (Weak w) = IO $ \s ->
        (# s1, _,  f #) -> f s1
 #endif
 
+#include "Dynamic.h"
+INSTANCE_TYPEABLE1(Weak,weakTc,"Weak")
 
 {- $precise