@@ -52,6 +52,10 @@ acyclic r cvs = checkCycle (FC "root" 0) r [] 0 cvs
52 = Error $ At fc UniverseError
52 = Error $ At fc UniverseError
53 -- FIXME: Make informative
53 -- FIXME: Make informative
54 -- e.g. (Msg ("Cycle: " ++ show cv ++ ", " ++ show path))
54 -- e.g. (Msg ("Cycle: " ++ show cv ++ ", " ++ show path))
55+ -- if we reach a cycle but we're at the same universe level, it's
56+ -- fine, because they must all be equal, so stop.
57+ | inc == 0 && cv `elem` map fst path
55 | otherwise = case M.lookup cv r of
59 | otherwise = case M.lookup cv r of
56 Nothing -> return ()
60 Nothing -> return ()
57 Just cs -> mapM_ (next ((cv, fc):path) inc) cs
61 Just cs -> mapM_ (next ((cv, fc):path) inc) cs