@@ -154,6 +154,7 @@ getProperName _ = error "Expected DataDeclaration"
155toBindingGroup :: ModuleName -> SCC Declaration -> Either ErrorStack Declaration
155toBindingGroup :: ModuleName -> SCC Declaration -> Either ErrorStack Declaration
156toBindingGroup _ (AcyclicSCC d) = return d
156toBindingGroup _ (AcyclicSCC d) = return d
157+toBindingGroup _ (CyclicSCC [d]) = return d
157toBindingGroup moduleName (CyclicSCC ds') =
158toBindingGroup moduleName (CyclicSCC ds') =
158 -- Once we have a mutually-recursive group of declarations, we need to sort
159 -- Once we have a mutually-recursive group of declarations, we need to sort
159 -- them further by their immediate dependencies (those outside function
160 -- them further by their immediate dependencies (those outside function