Merge pull request #728 from dylex/master
Catch erroneous (singleton) recursive definitions
commit0d5191ed61b1b364e108f3ea3b63126d394c5ff4
authorPhil Freeman <paf31@cantab.net>
dateTue 25 Nov 2014, 19:35 (12 years ago)
parentc68f9452bd5dc4
src/Language/PureScript/Sugar/BindingGroups.hs−1
@@ -151,7 +151,6 @@ getProperName _ = error "Expected DataDeclaration"
151151--
152152toBindingGroup :: ModuleName -> SCC Declaration -> Either ErrorStack Declaration
153153toBindingGroup _ (AcyclicSCC d) = return d
154−toBindingGroup _ (CyclicSCC [d]) = return d
155154toBindingGroup moduleName (CyclicSCC ds') =
156155 -- Once we have a mutually-recursive group of declarations, we need to sort
157156 -- them further by their immediate dependencies (those outside function