@@ -37,9 +37,9 @@ import HscTypes (HomeModInfo,
37
37
hm_linkable )
38
38
39
39
import Data.ByteString (ByteString )
40
- import qualified Data.ByteString.Char8 as BS
41
40
import Data.Int (Int64 )
42
41
import Data.Text (Text )
42
+ import Data.Time
43
43
import Development.IDE.Import.FindImports (ArtifactsLocation )
44
44
import Development.IDE.Spans.Common
45
45
import Development.IDE.Spans.LocalBindings
@@ -48,6 +48,8 @@ import Fingerprint
48
48
import GHC.Serialized (Serialized )
49
49
import Language.LSP.Types (NormalizedFilePath )
50
50
import TcRnMonad (TcGblEnv )
51
+ import qualified Data.Binary as B
52
+ import qualified Data.ByteString.Lazy as LBS
51
53
52
54
data LinkableType = ObjectLinkable | BCOLinkable
53
55
deriving (Eq ,Ord ,Show , Generic )
@@ -168,11 +170,11 @@ hiFileFingerPrint HiFileResult{..} = hirIfaceFp <> hirLinkableFp
168
170
mkHiFileResult :: ModSummary -> HomeModInfo -> HiFileResult
169
171
mkHiFileResult hirModSummary hirHomeMod = HiFileResult {.. }
170
172
where
171
- hirIfaceFp =
172
- fingerprintToBS . getModuleHash . hm_iface $ hirHomeMod -- will always be two bytes
173
+ hirIfaceFp = fingerprintToBS . getModuleHash . hm_iface $ hirHomeMod -- will always be two bytes
173
174
hirLinkableFp = case hm_linkable hirHomeMod of
174
175
Nothing -> " "
175
- Just l -> BS. pack $ show $ linkableTime l
176
+ Just LM {linkableTime} -> LBS. toStrict $
177
+ B. encode (fromEnum $ utctDay linkableTime, fromEnum $ utctDayTime linkableTime)
176
178
177
179
hirModIface :: HiFileResult -> ModIface
178
180
hirModIface = hm_iface . hirHomeMod
0 commit comments