[Git][ghc/ghc][wip/fendor/ghc-iface-refact] Deleted 1 commit: Fixup: Generic Symbol Table

Hannes Siebenhandl (@fendor) gitlab at gitlab.haskell.org
Tue Apr 2 10:51:06 UTC 2024



Hannes Siebenhandl pushed to branch wip/fendor/ghc-iface-refact at Glasgow Haskell Compiler / GHC


WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.


Deleted commits:
345e81f4 by Fendor at 2024-04-02T12:40:31+02:00
Fixup: Generic Symbol Table

- - - - -


1 changed file:

- compiler/GHC/Utils/Binary.hs


Changes:

=====================================
compiler/GHC/Utils/Binary.hs
=====================================
@@ -89,15 +89,6 @@ module GHC.Utils.Binary
    initFastStringReaderTable, initFastStringWriterTable,
    putDictionary, getDictionary, putFS,
    FSTable(..), getDictFastString, putDictFastString,
-<<<<<<< HEAD
-   -- * Generic Symbol that can be used for user-defined deduplication tables.
-   GenericSymbolTable(..),
-   initGenericSymbolTable,
-   putGenericSymbolTable, getGenericSymbolTable,
-   putGenericSymTab, getGenericSymtab,
-||||||| parent of f3fd018a62 (Fixup: Generic Symbol Table)
-
-=======
 
    -- * Generic Symbol that can be used for user-defined deduplication tables.
    GenericSymbolTable(..),
@@ -105,7 +96,6 @@ module GHC.Utils.Binary
    putGenericSymbolTable, getGenericSymbolTable,
    putGenericSymTab, getGenericSymtab,
 
->>>>>>> f3fd018a62 (Fixup: Generic Symbol Table)
    -- * Newtype wrappers
    BinSpan(..), BinSrcSpan(..), BinLocated(..)
   ) where
@@ -1330,7 +1320,7 @@ initGenericSymbolTable = do
         , gen_symtab_map  = symtab_map
         }
 
-putGenericSymbolTable :: forall a. GenericSymbolTable a -> (BinHandle -> a -> IO ()) -> BinHandle -> IO Int
+putGenericSymbolTable :: forall a. GenericSymbolTable a -> (WriteBinHandle -> a -> IO ()) -> WriteBinHandle -> IO Int
 putGenericSymbolTable gen_sym_tab serialiser bh = do
   table_count <- readFastMutInt symtab_next
   symtab_map  <- readIORef symtab_map
@@ -1339,13 +1329,13 @@ putGenericSymbolTable gen_sym_tab serialiser bh = do
   where
     symtab_map = gen_symtab_map gen_sym_tab
     symtab_next = gen_symtab_next gen_sym_tab
-    putGenericSymbolTable :: BinHandle -> Int -> Map.Map a Int -> IO ()
+    putGenericSymbolTable :: WriteBinHandle -> Int -> Map.Map a Int -> IO ()
     putGenericSymbolTable bh name_count symtab = do
         put_ bh name_count
         let genElements = elems (array (0,name_count-1) (fmap swap $ Map.toList symtab))
         mapM_ (\n -> serialiser bh n) genElements
 
-getGenericSymbolTable :: forall a. (BinHandle -> IO a) -> BinHandle -> IO (SymbolTable a)
+getGenericSymbolTable :: forall a. (ReadBinHandle -> IO a) -> ReadBinHandle -> IO (SymbolTable a)
 getGenericSymbolTable deserialiser bh = do
   sz <- get bh :: IO Int
   mut_arr <- newArray_ (0, sz-1) :: IO (IOArray Int a)
@@ -1354,7 +1344,7 @@ getGenericSymbolTable deserialiser bh = do
     writeArray mut_arr i f
   unsafeFreeze mut_arr
 
-putGenericSymTab :: (Ord a, Binary a) => GenericSymbolTable a -> BinHandle -> a -> IO ()
+putGenericSymTab :: (Ord a, Binary a) => GenericSymbolTable a -> WriteBinHandle -> a -> IO ()
 putGenericSymTab GenericSymbolTable{
                gen_symtab_map = symtab_map_ref,
                gen_symtab_next = symtab_next }
@@ -1370,7 +1360,7 @@ putGenericSymTab GenericSymbolTable{
       put_ bh (fromIntegral off :: Word32)
 
 getGenericSymtab :: Binary a => SymbolTable a
-              -> BinHandle -> IO a
+              -> ReadBinHandle -> IO a
 getGenericSymtab symtab bh = do
   i :: Word32 <- get bh
   return $! symtab ! fromIntegral i



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/345e81f47d9f811c124207ce51cf8f95bdb01b1e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/345e81f47d9f811c124207ce51cf8f95bdb01b1e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240402/1ce186ca/attachment-0001.html>


More information about the ghc-commits mailing list