fix(test): fixed compiler errors (oops)

This commit is contained in:
Wolfgang Witt 2021-02-24 16:42:10 +01:00 committed by Wolfgang Witt
parent daceac95fc
commit bc42f3072f

View File

@ -316,14 +316,14 @@ spec = do
mappingImpossible
rule
userProperties@(sort . map (ruleProperty rule . fst) . Map.elems . Map.filter (isRelevantUser rule) -> relevantUsers)
(map snd . Map.toList . adjustOccurrences userProperties -> occurrences') = go 0 True relevantUsers occurrences'
(map snd . Map.toList . adjustOccurrences userProperties -> occurrences') = go 0 relevantUsers occurrences'
where
smallestRoom :: Natural
smallestRoom = maybe 0 minimum $ fromNullable occurrences'
-- If there exists a bucket with the same tag bigger than the smallest room a nullResult might be returned
-- It may still work, but is not guaranteed (e.g. both the first bucket)
go :: Natural -> [Maybe Text] -> [Natural] -> Bool
go biggestUserBucket [] _occurrences = biggestUserBucket > small
go biggestUserBucket [] _occurrences = biggestUserBucket > smallestRoom
go _biggestUserBucket _remainingUsers [] = True
go biggestUserBucket remainingUsers (0:t) = go biggestUserBucket remainingUsers t
go biggestUserBucket remainingUsers@(h:_t) (firstOccurrence:laterOccurrences)