diff --git a/src/Toplevel.hs b/src/Toplevel.hs index 981d5ce..16c56ca 100644 --- a/src/Toplevel.hs +++ b/src/Toplevel.hs @@ -85,7 +85,7 @@ detectLoop v g i = else case M.lookup i g of Nothing -> pure v -- this has already been removed, meaning this branch is safe Just is -> if is == S.empty - then pure v -- leaf \/ Set not Traversable + then pure (S.insert i v) else S.unions <$> detectLoop (S.insert i v) g <~> S.toList is createGraph :: [TL] -> RefGraph diff --git a/test.hm b/test.hm index f44dd8a..adf26ac 100644 --- a/test.hm +++ b/test.hm @@ -54,4 +54,8 @@ isEven : Nat → Bool type bot -absurd : bot -> A := rec[bot] +absurd : bot -> A + := rec[bot] + +id : A -> A + := λx. x