- | GuardBinBox Bool
- | CondBinBox Bool
- | QualBinBox Bool
- | ExternalBox String HpcPos
- -- ^The position was generated from the named file/module,
- -- with the stated position (inside the named file/module).
- -- The HpcPos inside this MixEntry refers to the generated Haskell location.
- deriving (Read, Show)
-
+ | BinBox CondBox Bool
+ deriving (Read, Show, Eq, Ord)
+
+data CondBox = GuardBinBox
+ | CondBinBox
+ | QualBinBox
+ deriving (Read, Show, Eq, Ord)
+
+-- For the hash value, we hash everything: the file name,
+-- the timestamp of the original source file, the tab stop,
+-- and the mix entries. We cheat, and hash the show'd string.
+-- This hash only has to be hashed at Mix creation time,
+-- and is for sanity checking only.
+
+mixHash :: FilePath -> Integer -> Int -> [MixEntry_] -> Int
+mixHash file tm tabstop entries = fromIntegral $ hashString
+ (show $ Mix file tm 0 tabstop entries)
+