From adca17adc9f53bb8ab451d0a11911c04145c8fb3 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 8 Feb 2021 16:03:17 +0100 Subject: NameCache doesn't store a UniqSupply anymore --- haddock-api/src/Haddock/InterfaceFile.hs | 14 ++------------ hypsrc-test/ref/src/Classes.html | 14 +++++++------- hypsrc-test/ref/src/Records.html | 16 ++++++++-------- 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/haddock-api/src/Haddock/InterfaceFile.hs b/haddock-api/src/Haddock/InterfaceFile.hs index 7147dc9d..f47e2df0 100644 --- a/haddock-api/src/Haddock/InterfaceFile.hs +++ b/haddock-api/src/Haddock/InterfaceFile.hs @@ -23,11 +23,7 @@ module Haddock.InterfaceFile ( import Haddock.Types -import Control.Monad -import Control.Monad.IO.Class ( MonadIO(..) ) -import Data.Array import Data.IORef -import Data.List (mapAccumR) import qualified Data.Map as Map import Data.Map (Map) import Data.Word @@ -37,13 +33,8 @@ import GHC.Utils.Binary import GHC.Data.FastMutInt import GHC.Data.FastString import GHC hiding (NoLink) -import GHC.Driver.Monad (withSession) -import GHC.Driver.Env import GHC.Types.Name.Cache -import GHC.Iface.Env -import GHC.Types.Name import GHC.Types.Unique.FM -import GHC.Types.Unique.Supply import GHC.Types.Unique data InterfaceFile = InterfaceFile { @@ -166,9 +157,8 @@ writeInterfaceFile filename iface = do freshNameCache :: IO NameCache -freshNameCache = do - u <- mkSplitUniqSupply 'a' -- ?? - initNameCache u [] +freshNameCache = initNameCache 'a' -- ?? + [] -- | Read a Haddock (@.haddock@) interface file. Return either an -- 'InterfaceFile' or an error message. diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html index 688b6db6..16d3b333 100644 --- a/hypsrc-test/ref/src/Classes.html +++ b/hypsrc-test/ref/src/Classes.html @@ -194,7 +194,7 @@ >bar :: Int -> Int barbaz :: Int -> (Int, Int) bazbar :: [a] -> Int barbaz :: Int -> ([a], [a]) baznorf :: [Int] -> Int norfquux :: ([a], [a]) -> [a] quuxplugh :: forall a b. Either a a -> Either b b -> Either (a -> b) (b -> a) plughInt -x :: Int x :: Point -> Int +x :: Int xInt -y :: Int y :: Point -> Int +y :: Int yInt -y :: Int -x :: Int -y :: Point -> Int x :: Point -> Int +y :: Point -> Int +x :: Int +y :: Int ..