Skip to content

Commit 8665a52

Browse files
committed
fix one more fingerprint
1 parent 065fce7 commit 8665a52

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ghcide/src/Development/IDE/Core/RuleTypes.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ import HscTypes (HomeModInfo,
3737
hm_linkable)
3838

3939
import Data.ByteString (ByteString)
40-
import qualified Data.ByteString.Char8 as BS
4140
import Data.Int (Int64)
4241
import Data.Text (Text)
42+
import Data.Time
4343
import Development.IDE.Import.FindImports (ArtifactsLocation)
4444
import Development.IDE.Spans.Common
4545
import Development.IDE.Spans.LocalBindings
@@ -48,6 +48,8 @@ import Fingerprint
4848
import GHC.Serialized (Serialized)
4949
import Language.LSP.Types (NormalizedFilePath)
5050
import TcRnMonad (TcGblEnv)
51+
import qualified Data.Binary as B
52+
import qualified Data.ByteString.Lazy as LBS
5153

5254
data LinkableType = ObjectLinkable | BCOLinkable
5355
deriving (Eq,Ord,Show, Generic)
@@ -168,11 +170,11 @@ hiFileFingerPrint HiFileResult{..} = hirIfaceFp <> hirLinkableFp
168170
mkHiFileResult :: ModSummary -> HomeModInfo -> HiFileResult
169171
mkHiFileResult hirModSummary hirHomeMod = HiFileResult{..}
170172
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
173174
hirLinkableFp = case hm_linkable hirHomeMod of
174175
Nothing -> ""
175-
Just l -> BS.pack $ show $ linkableTime l
176+
Just LM{linkableTime} -> LBS.toStrict $
177+
B.encode (fromEnum $ utctDay linkableTime, fromEnum $ utctDayTime linkableTime)
176178

177179
hirModIface :: HiFileResult -> ModIface
178180
hirModIface = hm_iface . hirHomeMod

0 commit comments

Comments
 (0)