[code cleanups in Atom
John Meacham <john@repetae.net>**20050928083110] hunk ./Atom.hs 1
--- arch-tag: da6b923d-c4d6-4918-9ce4-35ca0167d387
hunk ./Atom.hs 3
-import PackedString
-import qualified Data.HashTable as HT
-import Foreign
hunk ./Atom.hs 4
---import Binary
-import System.IO.Unsafe
-import List(sort)
hunk ./Atom.hs 6
+import Foreign
+import List(sort)
+import qualified Data.HashTable as HT
+import System.IO.Unsafe
+
+import PackedString
hunk ./Atom.hs 69
-instance FromAtom Int where
-    fromAtom (Atom i _) = i
+--instance FromAtom Int where
+--    fromAtom (Atom i _) = i
hunk ./Atom.hs 99
+
+
+-- The following are 'unwise' in that they may reveal internal structure that may differ between program runs
hunk ./Atom.hs 112
-
-{-
-    xs <- HT.toList table
-    case [ at | (_,at@(Atom i' _)) <- xs, i' == i ] of
-        [a] -> return (return a)
-        [] -> return $ fail $ "intToAtom: " ++ show i
-        _ -> error "intToAtom: can't happen"
-instance Binary Atom where
-    get bh = do
-        ps <- get bh
-        a <- fromPackedStringIO ps
-        return a
-    put_ bh (Atom _ ps) = put_ bh ps
-
--}