Skip to content

Commit 216e277

Browse files
committed
Fixes non-exhaustive pattern in transitiveClosure
Fixes #23
1 parent c762ec1 commit 216e277

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Autotool/Data/Relation.hs

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,8 @@ transitiveClosure r = unions $ uniques (r : unfoldr mkTransitive r)
4848
in if r'' == r' || null r''
4949
then Nothing
5050
else Just (r'',r'')
51+
uniques [] = []
5152
uniques xs = go [] xs
52-
where go ys (x:xs) = if x `elem` ys then ys else go (x:ys) xs
53+
where
54+
go ys [] = ys
55+
go ys (x:xs) = if x `elem` ys then ys else go (x:ys) xs

0 commit comments

Comments
 (0)