...
 
Commits (4)
......@@ -270,6 +270,7 @@ classify tok =
ITtilde -> TkGlyph
ITdarrow {} -> TkGlyph
ITminus -> TkGlyph
ITprefixminus -> TkGlyph
ITbang -> TkGlyph
ITdot -> TkOperator
ITstar {} -> TkOperator
......
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
......@@ -276,7 +277,7 @@ putName BinSymbolTable{
data BinSymbolTable = BinSymbolTable {
bin_symtab_next :: !FastMutInt, -- The next index to use
bin_symtab_map :: !(IORef (UniqFM (Int,Name)))
bin_symtab_map :: !(IORef (UniqFM Name (Int,Name)))
-- indexed by Name
}
......@@ -286,24 +287,24 @@ putFastString BinDictionary { bin_dict_next = j_r,
bin_dict_map = out_r} bh f
= do
out <- readIORef out_r
let unique = getUnique f
case lookupUFM out unique of
let !unique = getUnique f
case lookupUFM_Directly out unique of
Just (j, _) -> put_ bh (fromIntegral j :: Word32)
Nothing -> do
j <- readFastMutInt j_r
put_ bh (fromIntegral j :: Word32)
writeFastMutInt j_r (j + 1)
writeIORef out_r $! addToUFM out unique (j, f)
writeIORef out_r $! addToUFM_Directly out unique (j, f)
data BinDictionary = BinDictionary {
bin_dict_next :: !FastMutInt, -- The next index to use
bin_dict_map :: !(IORef (UniqFM (Int,FastString)))
bin_dict_map :: !(IORef (UniqFM FastString (Int,FastString)))
-- indexed by FastString
}
putSymbolTable :: BinHandle -> Int -> UniqFM (Int,Name) -> IO ()
putSymbolTable :: BinHandle -> Int -> UniqFM Name (Int,Name) -> IO ()
putSymbolTable bh next_off symtab = do
put_ bh next_off
let names = elems (array (0,next_off-1) (eltsUFM symtab))
......@@ -346,7 +347,7 @@ fromOnDiskName _ nc (pid, mod_name, occ) =
}
serialiseName :: BinHandle -> Name -> UniqFM (Int,Name) -> IO ()
serialiseName :: BinHandle -> Name -> UniqFM Name (Int,Name) -> IO ()
serialiseName bh name _ = do
let modu = nameModule name
put_ bh (moduleUnit modu, moduleName modu, nameOccName name)
......
......@@ -50,14 +50,14 @@
><li class="src short"
><span class="keyword"
>type family</span
> (a :: <a href="#" title="GHC.TypeNats"
>Nat</a
> (a :: <a href="#" title="Numeric.Natural"
>Natural</a
>) <a href="#"
>+</a
> (b :: <a href="#" title="GHC.TypeNats"
>Nat</a
>) :: <a href="#" title="GHC.TypeNats"
>Nat</a
> (b :: <a href="#" title="Numeric.Natural"
>Natural</a
>) :: <a href="#" title="Numeric.Natural"
>Natural</a
> <span class="keyword"
>where ...</span
></li
......@@ -71,14 +71,14 @@
><p class="src"
><span class="keyword"
>type family</span
> (a :: <a href="#" title="GHC.TypeNats"
>Nat</a
> (a :: <a href="#" title="Numeric.Natural"
>Natural</a
>) <a id="t:-43-" class="def"
>+</a
> (b :: <a href="#" title="GHC.TypeNats"
>Nat</a
>) :: <a href="#" title="GHC.TypeNats"
>Nat</a
> (b :: <a href="#" title="Numeric.Natural"
>Natural</a
>) :: <a href="#" title="Numeric.Natural"
>Natural</a
> <span class="keyword"
>where ...</span
> <span class="fixity"
......