diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2020-09-14 12:53:21 +1000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2020-09-14 12:53:21 +1000 |
commit | a04562f88c594817ad98cdf9aa38e24d6c0ed0ea (patch) | |
tree | f5eacb6848f77f4c685571cfc420e5e363f3c521 /compiler/iface/BinIface.hs | |
parent | 29204b1c4f52ea34d84da33593052ee839293bf2 (diff) | |
download | haskell-wip/coreField8102.tar.gz |
Patch commit for haskell.nix 8.10.2 core interface fieldwip/coreField8102
Diffstat (limited to 'compiler/iface/BinIface.hs')
-rw-r--r-- | compiler/iface/BinIface.hs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index faee723bd2..0f7073f15c 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -148,7 +148,15 @@ readBinIface_ dflags checkHiWay traceBinIFaceReading hi_path ncu = do wantedGot "Way" way_descr check_way ppr when (checkHiWay == CheckHiWay) $ errorOnMismatch "mismatched interface file ways" way_descr check_way - getWithUserData ncu bh + + extFields_p <- get bh + + mod_iface <- getWithUserData ncu bh + + seekBin bh extFields_p + extFields <- get bh + + return mod_iface{mi_ext_fields = extFields} -- | This performs a get action after reading the dictionary and symbol @@ -200,8 +208,16 @@ writeBinIface dflags hi_path mod_iface = do let way_descr = getWayDescr dflags put_ bh way_descr + extFields_p_p <- tellBin bh + put_ bh extFields_p_p putWithUserData (debugTraceMsg dflags 3) bh mod_iface + + extFields_p <- tellBin bh + putAt bh extFields_p_p extFields_p + seekBin bh extFields_p + put_ bh (mi_ext_fields mod_iface) + -- And send the result to the file writeBinMem bh hi_path |