@@ -157,7 +157,6 @@ getProperName _ = error "Expected DataDeclaration"
158toBindingGroup :: ModuleName -> SCC Declaration -> Either ErrorStack Declaration
158toBindingGroup :: ModuleName -> SCC Declaration -> Either ErrorStack Declaration
159toBindingGroup _ (AcyclicSCC d) = return d
159toBindingGroup _ (AcyclicSCC d) = return d
160−toBindingGroup _ (CyclicSCC [d]) = return d
161toBindingGroup moduleName (CyclicSCC ds') =
160toBindingGroup moduleName (CyclicSCC ds') =
162 -- Once we have a mutually-recursive group of declarations, we need to sort
161 -- Once we have a mutually-recursive group of declarations, we need to sort
163 -- them further by their immediate dependencies (those outside function
162 -- them further by their immediate dependencies (those outside function
@@ -187,7 +186,6 @@ toBindingGroup moduleName (CyclicSCC ds') =
187 cycleError d ds@(_:_) = rethrow (<> mkErrorStack ("The following are not yet defined here: " ++ unwords (map (show . getIdent) ds)) Nothing) $ cycleError d []
186 cycleError d ds@(_:_) = rethrow (<> mkErrorStack ("The following are not yet defined here: " ++ unwords (map (show . getIdent) ds)) Nothing) $ cycleError d []
188 cycleError _ _ = error "Expected ValueDeclaration"
187 cycleError _ _ = error "Expected ValueDeclaration"
191toDataBindingGroup :: SCC Declaration -> Either ErrorStack Declaration
189toDataBindingGroup :: SCC Declaration -> Either ErrorStack Declaration
192toDataBindingGroup (AcyclicSCC d) = return d
190toDataBindingGroup (AcyclicSCC d) = return d
193toDataBindingGroup (CyclicSCC [d]) = case isTypeSynonym d of
191toDataBindingGroup (CyclicSCC [d]) = case isTypeSynonym d of