Skip to content

Commit

Permalink
Make VCHashUpdate @ctime always encode as 64 bits (#155)
Browse files Browse the repository at this point in the history
This makes vcHash for VCMeta produce the same hash on 32bit and 64 bit
plarforms
  • Loading branch information
albertov authored Jan 21, 2025
1 parent c323f3d commit c8fd999
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions inferno-types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Revision History for inferno-types
*Note*: we use https://pvp.haskell.org/ (MAJOR.MAJOR.MINOR.PATCH)

## 0.4.6.1 -- 2025-1-21
* Change VCUpdateHash @CTime so it produces the same output in both 32bit and
64bit architectures

## 0.4.6.0 -- 2024-07-25
* mtl 2.3 compatibility

Expand Down
2 changes: 1 addition & 1 deletion inferno-types/inferno-types.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: >=1.10
name: inferno-types
version: 0.4.6.0
version: 0.4.6.1
synopsis: Core types for Inferno
description: Core types for the Inferno language
category: DSL,Scripting
Expand Down
2 changes: 1 addition & 1 deletion inferno-types/src/Inferno/Types/VersionControl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ deriving via (VCHashUpdateViaShow InfixFixity) instance VCHashUpdate InfixFixity
deriving via (VCHashUpdateViaShow Fixity) instance VCHashUpdate Fixity

instance VCHashUpdate CTime where
ctxt &< (CTime t) = ctxt &< ("CTime" :: ByteString) &< t
ctxt &< (CTime t) = ctxt &< ("CTime" :: ByteString) &< (fromIntegral @_ @Int64 t)

instance VCHashUpdate a => VCHashUpdate (Maybe a) where
ctxt &< Nothing = ctxt
Expand Down

0 comments on commit c8fd999

Please sign in to comment.