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