Add ContentHash.nil

This commit is contained in:
Jeroen Engels 2024-04-10 20:45:39 +02:00
parent b872bac7f6
commit 1d139cd385
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
module Review.Cache.ContentHash exposing (ContentHash, hash)
module Review.Cache.ContentHash exposing (ContentHash, hash, nil)
import Vendor.Murmur3 as Murmur3
@ -7,6 +7,11 @@ type ContentHash
= ContentHash Int
nil : ContentHash
nil =
ContentHash 0
hash : String -> ContentHash
hash source =
ContentHash (Murmur3.hashString 0 source)

View File

@ -87,7 +87,7 @@ new =
, readme = Nothing
, extraFiles = []
, extraFiles2 = Dict.empty
, extraFilesContentHash = ContentHash.hash ""
, extraFilesContentHash = ContentHash.nil
, extraFilesContentHashes = Dict.empty
, dependencies = Dict.empty
, moduleGraph = Nothing