Commit 2fb4de6c authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add comment on MonitorStateFileSet being a bag [skip ci]

Explain why it's not represented by a Set.
parent c7d55c3c
...@@ -201,6 +201,11 @@ monitorFileHashedSearchPath notFoundAtPaths foundAtPath = ...@@ -201,6 +201,11 @@ monitorFileHashedSearchPath notFoundAtPaths foundAtPath =
data MonitorStateFileSet data MonitorStateFileSet
= MonitorStateFileSet ![MonitorStateFile] = MonitorStateFileSet ![MonitorStateFile]
![MonitorStateGlob] ![MonitorStateGlob]
-- Morally this is not actually a set but a bag (represented by lists).
-- There is no principled reason to use a bag here rather than a set, but
-- there is also no particular gain either. That said, we do preserve the
-- order of the lists just to reduce confusion (and have predictable I/O
-- patterns).
deriving Show deriving Show
type Hash = Int type Hash = Int
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment