Jana Chadt pushed to branch wip/VeryMilkyJoe/no-mod-loc-pat at Glasgow Haskell Compiler / GHC

Commits:

12 changed files:

Changes:

  • compiler/GHC.hs
    ... ... @@ -79,7 +79,13 @@ module GHC (
    79 79
             ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries,
    
    80 80
             mgLookupModule,
    
    81 81
             ModSummary(..), ms_mod_name, ModLocation(..),
    
    82
    -        pattern ModLocation,
    
    82
    +        ml_hs_file,
    
    83
    +        ml_hi_file,
    
    84
    +        ml_dyn_hi_file,
    
    85
    +        ml_obj_file,
    
    86
    +        ml_dyn_obj_file,
    
    87
    +        ml_hie_file,
    
    88
    +        ml_bytecode_file,
    
    83 89
             getModSummary,
    
    84 90
             getModuleGraph,
    
    85 91
             isLoaded,
    
    ... ... @@ -457,6 +463,7 @@ import System.Environment ( getEnv, getProgName )
    457 463
     import System.Exit      ( exitWith, ExitCode(..) )
    
    458 464
     import System.FilePath
    
    459 465
     import System.IO.Error  ( isDoesNotExistError )
    
    466
    +import GHC.Data.OsPath (OsPath)
    
    460 467
     
    
    461 468
     #if defined(HAVE_INTERNAL_INTERPRETER)
    
    462 469
     import Foreign.C
    
    ... ... @@ -1575,12 +1582,12 @@ pprParenSymName a = parenSymOcc (getOccName a) (ppr (getName a))
    1575 1582
     -- a module by using 'getModSummary'
    
    1576 1583
     --
    
    1577 1584
     -- XXX: Explain pre-conditions
    
    1578
    -getModuleSourceAndFlags :: ModSummary -> IO (String, StringBuffer, DynFlags)
    
    1585
    +getModuleSourceAndFlags :: ModSummary -> IO (OsPath, StringBuffer, DynFlags)
    
    1579 1586
     getModuleSourceAndFlags m = do
    
    1580
    -  case ml_hs_file $ ms_location m of
    
    1587
    +  case ml_hs_file_ospath $ ms_location m of
    
    1581 1588
         Nothing -> throwIO $ mkApiErr (ms_hspp_opts m) (text "No source available for module " <+> ppr (ms_mod m))
    
    1582 1589
         Just sourceFile -> do
    
    1583
    -        source <- hGetStringBuffer sourceFile
    
    1590
    +        source <- hGetStringBufferOsPath sourceFile
    
    1584 1591
             return (sourceFile, source, ms_hspp_opts m)
    
    1585 1592
     
    
    1586 1593
     
    
    ... ... @@ -1592,7 +1599,7 @@ getModuleSourceAndFlags m = do
    1592 1599
     getTokenStream :: ModSummary -> IO [Located Token]
    
    1593 1600
     getTokenStream mod = do
    
    1594 1601
       (sourceFile, source, dflags) <- getModuleSourceAndFlags mod
    
    1595
    -  let startLoc = mkRealSrcLoc (mkFastString sourceFile) 1 1
    
    1602
    +  let startLoc = mkRealSrcLoc (mkFastStringOsString sourceFile) 1 1
    
    1596 1603
       case lexTokenStream (initParserOpts dflags) source startLoc of
    
    1597 1604
         POk _ ts    -> return ts
    
    1598 1605
         PFailed pst -> throwErrors (initSourceErrorContext dflags) (GhcPsMessage <$> getPsErrorMessages pst)
    
    ... ... @@ -1603,7 +1610,7 @@ getTokenStream mod = do
    1603 1610
     getRichTokenStream :: ModSummary -> IO [(Located Token, String)]
    
    1604 1611
     getRichTokenStream mod = do
    
    1605 1612
       (sourceFile, source, dflags) <- getModuleSourceAndFlags mod
    
    1606
    -  let startLoc = mkRealSrcLoc (mkFastString sourceFile) 1 1
    
    1613
    +  let startLoc = mkRealSrcLoc (mkFastStringOsString sourceFile) 1 1
    
    1607 1614
       case lexTokenStream (initParserOpts dflags) source startLoc of
    
    1608 1615
         POk _ ts    -> return $ addSourceToTokens startLoc source ts
    
    1609 1616
         PFailed pst -> throwErrors (initSourceErrorContext dflags) (GhcPsMessage <$> getPsErrorMessages pst)
    

  • compiler/GHC/Cmm/DebugBlock.hs
    ... ... @@ -33,7 +33,7 @@ import GHC.Cmm.CLabel
    33 33
     import GHC.Cmm
    
    34 34
     import GHC.Cmm.Reg ( pprGlobalReg, pprGlobalRegUse )
    
    35 35
     import GHC.Cmm.Utils
    
    36
    -import GHC.Data.FastString ( LexicalFastString, nilFS, mkFastString )
    
    36
    +import GHC.Data.FastString ( LexicalFastString, nilFS, mkFastStringOsString )
    
    37 37
     import GHC.Unit.Module
    
    38 38
     import GHC.Utils.Outputable
    
    39 39
     import GHC.Utils.Panic
    
    ... ... @@ -156,7 +156,7 @@ cmmDebugGen modLoc decls = map (blocksForScope Nothing) topScopes
    156 156
           rangeRating (span, _)
    
    157 157
             | srcSpanFile span == thisFile = 1
    
    158 158
             | otherwise                    = 2 :: Int
    
    159
    -      thisFile = maybe nilFS mkFastString $ ml_hs_file modLoc
    
    159
    +      thisFile = maybe nilFS mkFastStringOsString $ ml_hs_file_ospath modLoc
    
    160 160
     
    
    161 161
           -- Returns block tree for this scope as well as all nested
    
    162 162
           -- scopes. Note that if there are multiple blocks in the (exact)
    

  • compiler/GHC/CoreToStg/AddImplicitBinds.hs
    ... ... @@ -135,15 +135,16 @@ tick_it :: Bool -> ModLocation -> Name -> CoreExpr -> CoreExpr
    135 135
     -- If we want to generate debug info, we put a source note on the
    
    136 136
     -- worker. This is useful, especially for heap profiling.
    
    137 137
     tick_it generate_debug_info mod_loc name
    
    138
    -  | not generate_debug_info               = id
    
    138
    +  | not generate_debug_info                = id
    
    139 139
       | RealSrcSpan span _ <- nameSrcSpan name = tick span
    
    140
    -  | Just file <- ml_hs_file mod_loc       = tick (span1 file)
    
    141
    -  | otherwise                             = tick (span1 "???")
    
    140
    +  | Just file <- ml_hs_file_ospath mod_loc = tick (span2 file)
    
    141
    +  | otherwise                              = tick (span1 "???")
    
    142 142
       where
    
    143 143
         tick span  = Tick $ SourceNote span $
    
    144 144
                      LexicalFastString $ mkFastString $
    
    145 145
                      renderWithContext defaultSDocContext $ ppr name
    
    146
    -    span1 file = realSrcLocSpan $ mkRealSrcLoc (mkFastString file) 1 1
    
    146
    +    span1 str = realSrcLocSpan $ mkRealSrcLoc (mkFastString str) 1 1
    
    147
    +    span2 file = realSrcLocSpan $ mkRealSrcLoc (mkFastStringOsString file) 1 1
    
    147 148
     
    
    148 149
     
    
    149 150
     
    

  • compiler/GHC/Data/FastString.hs
    ... ... @@ -77,6 +77,7 @@ module GHC.Data.FastString
    77 77
             mkFastStringBytes,
    
    78 78
             mkFastStringByteList,
    
    79 79
             mkFastString#,
    
    80
    +        mkFastStringOsString,
    
    80 81
     
    
    81 82
             -- ** Deconstruction
    
    82 83
             unpackFS,           -- :: FastString -> String
    
    ... ... @@ -134,12 +135,14 @@ import qualified Data.ByteString as BS
    134 135
     import qualified Data.ByteString.Char8    as BSC
    
    135 136
     import qualified Data.ByteString.Unsafe   as BS
    
    136 137
     import qualified Data.ByteString.Short    as SBS
    
    137
    -import GHC.Data.ShortText (ShortText(..))
    
    138
    -import Foreign.C
    
    139
    -import System.IO
    
    140 138
     import Data.Data
    
    141 139
     import Data.IORef
    
    142 140
     import Data.Semigroup as Semi
    
    141
    +import Data.Type.Coercion (coerceWith)
    
    142
    +import Foreign.C
    
    143
    +import GHC.Data.ShortText (ShortText (..))
    
    144
    +import System.IO
    
    145
    +import System.OsString.Internal.Types
    
    143 146
     
    
    144 147
     import Foreign
    
    145 148
     
    
    ... ... @@ -547,6 +550,14 @@ mkFastStringShortByteString :: ShortByteString -> FastString
    547 550
     mkFastStringShortByteString sbs =
    
    548 551
       inlinePerformIO $ mkFastStringWith (mkNewFastStringShortByteString sbs) sbs
    
    549 552
     
    
    553
    +-- | Create a 'FastString' from an 'OsString', without copying.
    
    554
    +mkFastStringOsString :: OsString -> FastString
    
    555
    +mkFastStringOsString os = mkFastStringShortByteString $
    
    556
    +  -- Using 'OsPath''s 'unOS' here will unfortunately lead to cyclic dependencies
    
    557
    +  case coercionToPlatformTypes of
    
    558
    +    Left (_, windowsStringEv) -> unWS $ coerceWith windowsStringEv os
    
    559
    +    Right (_, posixStringEv) -> unPS $ coerceWith posixStringEv os
    
    560
    +
    
    550 561
     -- | Creates a UTF-8 encoded 'FastString' from a 'String'
    
    551 562
     mkFastString :: String -> FastString
    
    552 563
     {-# NOINLINE[1] mkFastString #-}
    

  • compiler/GHC/Data/OsPath.hs
    ... ... @@ -8,6 +8,7 @@ module GHC.Data.OsPath
    8 8
       , unsafeDecodeUtf
    
    9 9
       , unsafeEncodeUtf
    
    10 10
       , os
    
    11
    +  , unOS
    
    11 12
       -- * Common utility functions
    
    12 13
       , (</>)
    
    13 14
       , (<.>)
    
    ... ... @@ -28,13 +29,22 @@ import GHC.Prelude
    28 29
     import GHC.Utils.Misc (HasCallStack)
    
    29 30
     import GHC.Utils.Panic (panic)
    
    30 31
     
    
    32
    +import Data.ByteString.Short (ShortByteString)
    
    33
    +import Data.Type.Coercion (coerceWith)
    
    34
    +import System.Directory.Internal (os)
    
    35
    +import System.Directory.OsPath (createDirectoryIfMissing, doesDirectoryExist, doesFileExist, getDirectoryContents)
    
    31 36
     import System.OsPath
    
    32 37
     import System.OsString (isSuffixOf)
    
    33
    -import System.Directory.OsPath (doesDirectoryExist, doesFileExist, getDirectoryContents, createDirectoryIfMissing)
    
    34
    -import System.Directory.Internal (os)
    
    38
    +import System.OsString.Internal.Types (coercionToPlatformTypes, unPS, unWS)
    
    35 39
     
    
    36 40
     -- | Decode an 'OsPath' to 'FilePath', throwing an 'error' if decoding failed.
    
    37 41
     -- Prefer 'decodeUtf' and gracious error handling.
    
    38 42
     unsafeDecodeUtf :: HasCallStack => OsPath -> FilePath
    
    39 43
     unsafeDecodeUtf p =
    
    40 44
       either (\err -> panic $ "Failed to decodeUtf \"" ++ show p ++ "\", because: " ++ show err) id (decodeUtf p)
    
    45
    +
    
    46
    +-- | Extracts underlying 'ShortByteString' from the given 'OsString', taking care of platform specifics.
    
    47
    +unOS :: OsString -> ShortByteString
    
    48
    +unOS os = case coercionToPlatformTypes of
    
    49
    +  Left (_, windowsStringEv) -> unWS $ coerceWith windowsStringEv os
    
    50
    +  Right (_, posixStringEv) -> unPS $ coerceWith posixStringEv os

  • compiler/GHC/Data/StringBuffer.hs
    ... ... @@ -21,6 +21,7 @@ module GHC.Data.StringBuffer
    21 21
              -- * Creation\/destruction
    
    22 22
             hGetStringBuffer,
    
    23 23
             hGetStringBufferBlock,
    
    24
    +        hGetStringBufferOsPath,
    
    24 25
             hPutStringBuffer,
    
    25 26
             appendStringBuffers,
    
    26 27
             stringToStringBuffer,
    
    ... ... @@ -56,17 +57,19 @@ module GHC.Data.StringBuffer
    56 57
     import GHC.Prelude
    
    57 58
     
    
    58 59
     import GHC.Data.FastString
    
    60
    +import GHC.Data.OsPath (OsPath)
    
    61
    +import GHC.Fingerprint
    
    59 62
     import GHC.Utils.Encoding
    
    63
    +import GHC.Utils.Exception (bracket_)
    
    60 64
     import GHC.Utils.IO.Unsafe
    
    61 65
     import GHC.Utils.Panic.Plain
    
    62
    -import GHC.Utils.Exception      ( bracket_ )
    
    63
    -import GHC.Fingerprint
    
    64 66
     
    
    65 67
     import Data.Maybe
    
    68
    +import GHC.IO.Encoding.Failure (CodingFailureMode (IgnoreCodingFailure))
    
    69
    +import GHC.IO.Encoding.UTF8 (mkUTF8)
    
    70
    +import System.File.OsPath qualified as FileIO
    
    66 71
     import System.IO
    
    67
    -import System.IO.Unsafe         ( unsafePerformIO )
    
    68
    -import GHC.IO.Encoding.UTF8     ( mkUTF8 )
    
    69
    -import GHC.IO.Encoding.Failure  ( CodingFailureMode(IgnoreCodingFailure) )
    
    72
    +import System.IO.Unsafe (unsafePerformIO)
    
    70 73
     
    
    71 74
     import qualified Data.ByteString.Internal as BS
    
    72 75
     import qualified Data.ByteString as BS
    
    ... ... @@ -111,6 +114,15 @@ instance Show StringBuffer where
    111 114
     hGetStringBuffer :: FilePath -> IO StringBuffer
    
    112 115
     hGetStringBuffer fname = do
    
    113 116
        h <- openBinaryFile fname ReadMode
    
    117
    +   hGetStringBufferHandle h
    
    118
    +
    
    119
    +hGetStringBufferOsPath :: OsPath -> IO StringBuffer
    
    120
    +hGetStringBufferOsPath fname = do
    
    121
    +   h <- FileIO.openBinaryFile fname ReadMode
    
    122
    +   hGetStringBufferHandle h
    
    123
    +
    
    124
    +hGetStringBufferHandle :: Handle -> IO StringBuffer
    
    125
    +hGetStringBufferHandle h = do
    
    114 126
        size_i <- hFileSize h
    
    115 127
        offset_i <- skipBOM h size_i 0  -- offset is 0 initially
    
    116 128
        let size = fromIntegral $ size_i - offset_i
    

  • compiler/GHC/Stg/Debug.hs
    ... ... @@ -87,7 +87,7 @@ recordInfo :: Id -> StgExpr -> M ()
    87 87
     recordInfo bndr new_rhs = do
    
    88 88
       modLoc <- asks rModLocation
    
    89 89
       let
    
    90
    -    thisFile = maybe nilFS mkFastString $ ml_hs_file modLoc
    
    90
    +    thisFile = maybe nilFS mkFastStringOsString $ ml_hs_file_ospath modLoc
    
    91 91
         -- A span from the ticks surrounding the new_rhs
    
    92 92
         best_span = quickSourcePos thisFile new_rhs
    
    93 93
         -- A back-up span if the bndr had a source position, many do not (think internally generated ids)
    

  • compiler/GHC/Unit/Module/Location.hs
    ... ... @@ -2,31 +2,28 @@
    2 2
     {-# LANGUAGE ViewPatterns #-}
    
    3 3
     -- | Module location
    
    4 4
     module GHC.Unit.Module.Location
    
    5
    -   ( ModLocation
    
    6
    -    ( ..
    
    7
    -    , ml_hs_file
    
    8
    -    , ml_hi_file
    
    9
    -    , ml_dyn_hi_file
    
    10
    -    , ml_obj_file
    
    11
    -    , ml_dyn_obj_file
    
    12
    -    , ml_hie_file
    
    13
    -    , ml_bytecode_file
    
    14
    -    )
    
    15
    -   , pattern ModLocation
    
    5
    +   ( ModLocation(..)
    
    16 6
        , addBootSuffix
    
    17 7
        , addBootSuffixLocn
    
    18 8
        , addBootSuffixLocnOut
    
    19 9
        , removeBootSuffix
    
    20 10
        , mkFileSrcSpan
    
    11
    +   , ml_hs_file
    
    12
    +   , ml_hi_file
    
    13
    +   , ml_dyn_hi_file
    
    14
    +   , ml_obj_file
    
    15
    +   , ml_dyn_obj_file
    
    16
    +   , ml_hie_file
    
    17
    +   , ml_bytecode_file
    
    21 18
        )
    
    22 19
     where
    
    23 20
     
    
    24 21
     import GHC.Prelude
    
    25 22
     
    
    23
    +import GHC.Data.FastString (mkFastStringOsString)
    
    26 24
     import GHC.Data.OsPath
    
    27 25
     import GHC.Types.SrcLoc
    
    28 26
     import GHC.Utils.Outputable
    
    29
    -import GHC.Data.FastString (mkFastString)
    
    30 27
     
    
    31 28
     import qualified System.OsString as OsString
    
    32 29
     
    
    ... ... @@ -120,41 +117,38 @@ addBootSuffixLocnOut locn
    120 117
     -- | Compute a 'SrcSpan' from a 'ModLocation'.
    
    121 118
     mkFileSrcSpan :: ModLocation -> SrcSpan
    
    122 119
     mkFileSrcSpan mod_loc
    
    123
    -  = case ml_hs_file mod_loc of
    
    124
    -      Just file_path -> mkGeneralSrcSpan (mkFastString file_path)
    
    120
    +  = case ml_hs_file_ospath mod_loc of
    
    121
    +      Just file_path -> mkGeneralSrcSpan (mkFastStringOsString file_path)
    
    125 122
           Nothing        -> interactiveSrcSpan   -- Presumably
    
    126 123
     
    
    127 124
     -- ----------------------------------------------------------------------------
    
    128 125
     -- Helpers for backwards compatibility
    
    129 126
     -- ----------------------------------------------------------------------------
    
    130 127
     
    
    131
    -{-# COMPLETE ModLocation #-}
    
    132
    -
    
    133
    -pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> ModLocation
    
    134
    -pattern ModLocation
    
    135
    -  { ml_hs_file
    
    136
    -  , ml_hi_file
    
    137
    -  , ml_dyn_hi_file
    
    138
    -  , ml_obj_file
    
    139
    -  , ml_dyn_obj_file
    
    140
    -  , ml_hie_file
    
    141
    -  , ml_bytecode_file
    
    142
    -  } <- OsPathModLocation
    
    143
    -    { ml_hs_file_ospath = (fmap unsafeDecodeUtf -> ml_hs_file)
    
    144
    -    , ml_hi_file_ospath = (unsafeDecodeUtf -> ml_hi_file)
    
    145
    -    , ml_dyn_hi_file_ospath = (unsafeDecodeUtf -> ml_dyn_hi_file)
    
    146
    -    , ml_obj_file_ospath = (unsafeDecodeUtf -> ml_obj_file)
    
    147
    -    , ml_dyn_obj_file_ospath = (unsafeDecodeUtf -> ml_dyn_obj_file)
    
    148
    -    , ml_hie_file_ospath = (unsafeDecodeUtf -> ml_hie_file)
    
    149
    -    , ml_bytecode_file_ospath = (unsafeDecodeUtf -> ml_bytecode_file)
    
    150
    -    } where
    
    151
    -      ModLocation ml_hs_file ml_hi_file ml_dyn_hi_file ml_obj_file ml_dyn_obj_file ml_hie_file ml_bytecode_file
    
    152
    -        = OsPathModLocation
    
    153
    -          { ml_hs_file_ospath = fmap unsafeEncodeUtf ml_hs_file
    
    154
    -          , ml_hi_file_ospath = unsafeEncodeUtf ml_hi_file
    
    155
    -          , ml_dyn_hi_file_ospath = unsafeEncodeUtf ml_dyn_hi_file
    
    156
    -          , ml_obj_file_ospath = unsafeEncodeUtf ml_obj_file
    
    157
    -          , ml_dyn_obj_file_ospath = unsafeEncodeUtf ml_dyn_obj_file
    
    158
    -          , ml_hie_file_ospath = unsafeEncodeUtf ml_hie_file
    
    159
    -          , ml_bytecode_file_ospath = unsafeEncodeUtf ml_bytecode_file
    
    160
    -          }
    128
    +ml_hs_file :: ModLocation -> Maybe FilePath
    
    129
    +{-# INLINE ml_hs_file #-}
    
    130
    +ml_hs_file = fmap unsafeDecodeUtf . ml_hs_file_ospath
    
    131
    +
    
    132
    +ml_hi_file :: ModLocation -> FilePath
    
    133
    +{-# INLINE ml_hi_file #-}
    
    134
    +ml_hi_file = unsafeDecodeUtf . ml_hi_file_ospath
    
    135
    +
    
    136
    +ml_dyn_hi_file :: ModLocation -> FilePath
    
    137
    +{-# INLINE ml_dyn_hi_file #-}
    
    138
    +ml_dyn_hi_file = unsafeDecodeUtf . ml_dyn_hi_file_ospath
    
    139
    +
    
    140
    +ml_obj_file :: ModLocation -> FilePath
    
    141
    +{-# INLINE ml_obj_file #-}
    
    142
    +ml_obj_file = unsafeDecodeUtf . ml_obj_file_ospath
    
    143
    +
    
    144
    +ml_dyn_obj_file :: ModLocation -> FilePath
    
    145
    +{-# INLINE ml_dyn_obj_file #-}
    
    146
    +ml_dyn_obj_file = unsafeDecodeUtf . ml_dyn_obj_file_ospath
    
    147
    +
    
    148
    +ml_hie_file :: ModLocation -> FilePath
    
    149
    +{-# INLINE ml_hie_file #-}
    
    150
    +ml_hie_file = unsafeDecodeUtf . ml_hie_file_ospath
    
    151
    +
    
    152
    +ml_bytecode_file :: ModLocation -> FilePath
    
    153
    +{-# INLINE ml_bytecode_file #-}
    
    154
    +ml_bytecode_file = unsafeDecodeUtf . ml_bytecode_file_ospath

  • compiler/GHC/Unit/Module/ModSummary.hs
    ... ... @@ -46,7 +46,7 @@ import GHC.Types.PkgQual
    46 46
     import GHC.Types.Basic
    
    47 47
     
    
    48 48
     import GHC.Data.Maybe
    
    49
    -import GHC.Data.OsPath (OsPath)
    
    49
    +import GHC.Data.OsPath ( OsPath )
    
    50 50
     import GHC.Data.StringBuffer ( StringBuffer )
    
    51 51
     
    
    52 52
     import GHC.Utils.Fingerprint
    
    ... ... @@ -214,7 +214,7 @@ findTarget ms ts =
    214 214
             = ms_mod_name summary == m && ms_unitid summary == unitId
    
    215 215
         summary `matches` Target { targetId = TargetFile f _, targetUnitId = unitid }
    
    216 216
             | Just f' <- ml_hs_file (ms_location summary)
    
    217
    -        = f == f'  && ms_unitid summary == unitid
    
    217
    +        = f == f' && ms_unitid summary == unitid
    
    218 218
         _ `matches` _
    
    219 219
             = False
    
    220 220
     

  • compiler/ghc.cabal.in
    ... ... @@ -125,6 +125,7 @@ Library
    125 125
                        containers >= 0.6.2.1 && < 0.9,
    
    126 126
                        array      >= 0.1 && < 0.6,
    
    127 127
                        filepath   >= 1.5 && < 1.6,
    
    128
    +                   file-io    >= 0.1.5 && < 0.3,
    
    128 129
                        os-string  >= 2.0.1 && < 2.1,
    
    129 130
                        hpc        >= 0.6 && < 0.8,
    
    130 131
                        transformers >= 0.5 && < 0.7,
    

  • testsuite/tests/ghc-api/fixed-nodes/FixedNodes.hs
    ... ... @@ -31,7 +31,7 @@ convertToFixed (ModuleNodeCompile ms) =
    31 31
       -- with the module summary information
    
    32 32
       let modName = ms_mod_name ms
    
    33 33
           modLoc = ms_location ms
    
    34
    -  in ModuleNodeFixed (msKey ms) (ms_location ms) { ml_hs_file = Nothing}
    
    34
    +  in ModuleNodeFixed (msKey ms) (ms_location ms) { ml_hs_file_ospath = Nothing }
    
    35 35
     
    
    36 36
     
    
    37 37
     -- | Load a module graph and report the result
    

  • testsuite/tests/ghc-api/fixed-nodes/ModuleGraphInvariants.hs
    ... ... @@ -29,7 +29,7 @@ convertToFixed :: ModuleNodeInfo -> ModuleNodeInfo
    29 29
     convertToFixed (ModuleNodeCompile ms) =
    
    30 30
       let modName = ms_mod_name ms
    
    31 31
           modLoc = ms_location ms
    
    32
    -  in ModuleNodeFixed (msKey ms) (ms_location ms) { ml_hs_file = Nothing}
    
    32
    +  in ModuleNodeFixed (msKey ms) (ms_location ms) { ml_hs_file_ospath = Nothing }
    
    33 33
     
    
    34 34
     -- | Test a module graph and report if it matches expected invariant violations
    
    35 35
     testModuleGraph :: String -> ModuleGraph -> [ModuleGraphInvariantError] -> Ghc ()